Package groovy.lang
Class ExpandoMetaClass.ExpandoMetaProperty
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.ExpandoMetaClass.ExpandoMetaProperty
- All Implemented Interfaces:
GroovyObject
- Enclosing class:
- ExpandoMetaClass
protected class ExpandoMetaClass.ExpandoMetaProperty extends GroovyObjectSupport
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
-
Field Summary
Fields Modifier and Type Field Description protected booleanisStaticprotected StringpropertyName -
Constructor Summary
Constructors Modifier Constructor Description protectedExpandoMetaProperty(String name)protectedExpandoMetaProperty(String name, boolean isStatic) -
Method Summary
Modifier and Type Method Description ObjectgetProperty(String property)Retrieves a property value.StringgetPropertyName()booleanisStatic()ObjectleftShift(Object arg)voidsetProperty(String property, Object newValue)Sets the given property to the new value.
-
Field Details
-
propertyName
-
isStatic
protected boolean isStatic
-
-
Constructor Details
-
Method Details
-
getPropertyName
-
isStatic
public boolean isStatic() -
leftShift
-
getProperty
Description copied from interface:GroovyObjectRetrieves a property value.- 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.- Parameters:
property- the name of the property of interestnewValue- the new value for the property
-