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
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
ExpandoMetaProperty
(String name) protected
ExpandoMetaProperty
(String name, boolean isStatic) -
Method Summary
Modifier and TypeMethodDescriptiongetProperty
(String property) Retrieves a property value.boolean
isStatic()
void
setProperty
(String property, Object newValue) Sets the given property to the new value.Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, setMetaClass
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface groovy.lang.GroovyObject
invokeMethod
-
Field Details
-
propertyName
-
isStatic
protected boolean isStatic
-
-
Constructor Details
-
ExpandoMetaProperty
-
ExpandoMetaProperty
-
-
Method Details
-
getPropertyName
-
isStatic
public boolean isStatic() -
leftShift
-
getProperty
Description copied from interface:GroovyObject
Retrieves a property value.- Parameters:
property
- the name of the property of interest- Returns:
- the given property
-
setProperty
Description copied from interface:GroovyObject
Sets the given property to the new value.- Parameters:
property
- the name of the property of interestnewValue
- the new value for the property
-