Package org.codehaus.groovy.runtime
Class HandleMetaClass
java.lang.Object
groovy.lang.DelegatingMetaClass
org.codehaus.groovy.runtime.HandleMetaClass
- All Implemented Interfaces:
- GroovyObject,- MetaClass,- MetaObjectProtocol,- MutableMetaClass
- 
Field SummaryFields inherited from class groovy.lang.DelegatingMetaClassdelegate
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddMetaBeanProperty(MetaBeanProperty metaBeanProperty) Adds a new MetaBeanProperty to the MetaClassvoidaddMetaMethod(MetaMethod metaMethod) Adds a new MetaMethod to the MetaClassvoidaddNewInstanceMethod(Method method) adds a new instance method to this MetaClass.voidaddNewStaticMethod(Method method) adds a new static method to this MetaClass.booleangetProperty(String property) Retrieves a property value.voidComplete the initialisation process.invokeMethod(String name, Object args) Invokes the given method.voidsetProperty(String property, Object newValue) Sets the given property to the new value.Methods inherited from class groovy.lang.DelegatingMetaClassgetAdaptee, getAttribute, getAttribute, getClassNode, getMetaClass, getMetaMethod, getMetaMethods, getMetaProperty, getMethods, getProperties, getProperty, getProperty, getStaticMetaMethod, getStaticMetaMethod, getTheClass, hashCode, hasProperty, invokeConstructor, invokeMethod, invokeMethod, invokeMethod, invokeMissingMethod, invokeMissingProperty, invokeStaticMethod, isGroovyObject, isModified, pickMethod, respondsTo, respondsTo, selectConstructorAndTransformArguments, setAdaptee, setAttribute, setAttribute, setMetaClass, setProperty, setProperty, toString
- 
Constructor Details- 
HandleMetaClass
- 
HandleMetaClass
 
- 
- 
Method Details- 
initializepublic void initialize()Description copied from interface:MetaClassComplete the initialisation process. After this method is called no methods should be added to the metaclass. Invocation of methods or access to fields/properties is forbidden unless this method is called. This method should contain any initialisation code, taking a longer time to complete. An example is the creation of the Reflector. It is suggested to synchronize this method.- Specified by:
- initializein interface- MetaClass
- Overrides:
- initializein class- DelegatingMetaClass
 
- 
replaceDelegate
- 
invokeMethodDescription copied from interface:GroovyObjectInvokes the given method.- Specified by:
- invokeMethodin interface- GroovyObject
- Overrides:
- invokeMethodin class- DelegatingMetaClass
- Parameters:
- name- the name of the method to call
- args- the arguments to use for the method call
- Returns:
- the result of invoking the method
 
- 
getPropertyDescription copied from interface:GroovyObjectRetrieves a property value.- Specified by:
- getPropertyin interface- GroovyObject
- Overrides:
- getPropertyin class- DelegatingMetaClass
- Parameters:
- property- the name of the property of interest
- Returns:
- the given property
 
- 
setPropertyDescription copied from interface:GroovyObjectSets the given property to the new value.- Specified by:
- setPropertyin interface- GroovyObject
- Overrides:
- setPropertyin class- DelegatingMetaClass
- Parameters:
- property- the name of the property of interest
- newValue- the new value for the property
 
- 
addNewInstanceMethodDescription copied from interface:MutableMetaClassadds a new instance method to this MetaClass. Instance methods are able to overwrite the original methods of the class. Calling this method should not be done after initialise was called.- Specified by:
- addNewInstanceMethodin interface- MutableMetaClass
- Overrides:
- addNewInstanceMethodin class- DelegatingMetaClass
- Parameters:
- method- the method to be added
 
- 
addNewStaticMethodDescription copied from interface:MutableMetaClassadds a new static method to this MetaClass. This is only possible as long as initialise was not called.- Specified by:
- addNewStaticMethodin interface- MutableMetaClass
- Overrides:
- addNewStaticMethodin class- DelegatingMetaClass
- Parameters:
- method- the method to be added
 
- 
addMetaMethodDescription copied from interface:MutableMetaClassAdds a new MetaMethod to the MetaClass- Specified by:
- addMetaMethodin interface- MutableMetaClass
- Overrides:
- addMetaMethodin class- DelegatingMetaClass
- Parameters:
- metaMethod- The MetaMethod to add
 
- 
addMetaBeanPropertyDescription copied from interface:MutableMetaClassAdds a new MetaBeanProperty to the MetaClass- Specified by:
- addMetaBeanPropertyin interface- MutableMetaClass
- Overrides:
- addMetaBeanPropertyin class- DelegatingMetaClass
- Parameters:
- metaBeanProperty- The MetaBeanProperty instance
 
- 
equals- Overrides:
- equalsin class- DelegatingMetaClass
 
 
-