All posts with tag metaprogramming

Groovy Cookbook

Groovy: static propertyMissing and methodMissing methods - limitations and possible issues

Some time ago I have found another interesting Groovy related question on Stack Overflow. This time someone was asking about static variants of popular propertyMissing and methodMissing methods. The official Groovy documentation does not explain how to do it - it only explains how to add any static method through metaClass. Today we are going to learn how to define these methods in two different ways.