Package groovy.lang
Class ExpandoMetaClass.ExpandoMetaProperty
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.ExpandoMetaClass.ExpandoMetaProperty
- All Implemented Interfaces:
GroovyObject
- Enclosing class:
- ExpandoMetaClass
Instances of this class are returned when using the << left shift operator.
Example:
metaClass.myMethod << { String args -> }
This allows callbacks to the ExpandoMetaClass for registering appending methods
- Author:
- Graeme Rocher
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExpandoMetaProperty(String name) protectedExpandoMetaProperty(String name, boolean isStatic) -
Method Summary
Modifier and TypeMethodDescriptiongetProperty(String property) Retrieves a property value.booleanisStatic()voidsetProperty(String property, Object newValue) Sets the given property to the new value.Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, invokeMethod, setMetaClass
-
Field Details
-
propertyName
-
isStatic
protected boolean isStatic
-
-
Constructor Details
-
ExpandoMetaProperty
-
ExpandoMetaProperty
-
-
Method Details
-
getPropertyName
-
isStatic
public boolean isStatic() -
leftShift
-
getProperty
Description copied from interface:GroovyObjectRetrieves a property value.- Specified by:
getPropertyin interfaceGroovyObject- Overrides:
getPropertyin classGroovyObjectSupport- Parameters:
property- the name of the property of interest- Returns:
- the given property
-
setProperty
Description copied from interface:GroovyObjectSets the given property to the new value.- Specified by:
setPropertyin interfaceGroovyObject- Overrides:
setPropertyin classGroovyObjectSupport- Parameters:
property- the name of the property of interestnewValue- the new value for the property
-