Especially handy for using Groovy objects when in the Java world.
| Modifier and Type | Method and Description |
|---|---|
| public MetaClass | |
| public default Object | Returns: the given propertythe name of the property of interest propertyName)Retrieves a property value. |
| public default Object | Returns: the result of invoking the methodthe name of the method to call name, Object the arguments to use for the method call args)Invokes the given method. |
| public void | setMetaClass(MetaClass
the new metaclass metaClass)Allows the MetaClass to be replaced with a derived implementation. |
| public default void | setProperty(String
the name of the property of interest propertyName, Object the new value for the property newValue)Sets the given property to the new value. |
| getMetaClass | back to summary |
|---|---|
| public MetaClass getMetaClass() Returns the metaclass for a given class.
| |
| getProperty | back to summary |
|---|---|
| public default Object getProperty(String propertyName) Retrieves a property value. | |
| invokeMethod | back to summary |
|---|---|
| public default Object invokeMethod(String name, Object args) Invokes the given method. | |
| setMetaClass | back to summary |
|---|---|
| public void setMetaClass(MetaClass metaClass) Allows the MetaClass to be replaced with a derived implementation.
| |
| setProperty | back to summary |
|---|---|
| public default void setProperty(String propertyName, Object newValue) Sets the given property to the new value. | |