public class HandleMetaClass extends DelegatingMetaClass
delegate
Constructor and Description |
---|
HandleMetaClass(MetaClass mc) |
HandleMetaClass(MetaClass mc,
java.lang.Object obj) |
Modifier and Type | Method and Description |
---|---|
void |
addMetaBeanProperty(MetaBeanProperty metaBeanProperty)
Adds a new MetaBeanProperty to the MetaClass
|
void |
addMetaMethod(MetaMethod metaMethod)
Adds a new MetaMethod to the MetaClass
|
void |
addNewInstanceMethod(java.lang.reflect.Method method)
adds a new instance method to this MetaClass.
|
void |
addNewStaticMethod(java.lang.reflect.Method method)
adds a new static method to this MetaClass.
|
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
getProperty(java.lang.String property)
Retrieves a property value.
|
void |
initialize()
Complete the initialisation process.
|
java.lang.Object |
invokeMethod(java.lang.String name,
java.lang.Object args)
Invokes the given method.
|
GroovyObject |
replaceDelegate() |
void |
setProperty(java.lang.String property,
java.lang.Object newValue)
Sets the given property to the new value.
|
getAdaptee, 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
public HandleMetaClass(MetaClass mc)
public HandleMetaClass(MetaClass mc, java.lang.Object obj)
public void initialize()
MetaClass
initialize
in interface MetaClass
initialize
in class DelegatingMetaClass
public GroovyObject replaceDelegate()
public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
GroovyObject
invokeMethod
in interface GroovyObject
invokeMethod
in class DelegatingMetaClass
name
- the name of the method to callargs
- the arguments to use for the method callpublic java.lang.Object getProperty(java.lang.String property)
GroovyObject
getProperty
in interface GroovyObject
getProperty
in class DelegatingMetaClass
property
- the name of the property of interestpublic void setProperty(java.lang.String property, java.lang.Object newValue)
GroovyObject
setProperty
in interface GroovyObject
setProperty
in class DelegatingMetaClass
property
- the name of the property of interestnewValue
- the new value for the propertypublic void addNewInstanceMethod(java.lang.reflect.Method method)
MutableMetaClass
addNewInstanceMethod
in interface MutableMetaClass
addNewInstanceMethod
in class DelegatingMetaClass
method
- the method to be addedpublic void addNewStaticMethod(java.lang.reflect.Method method)
MutableMetaClass
addNewStaticMethod
in interface MutableMetaClass
addNewStaticMethod
in class DelegatingMetaClass
method
- the method to be addedpublic void addMetaMethod(MetaMethod metaMethod)
MutableMetaClass
addMetaMethod
in interface MutableMetaClass
addMetaMethod
in class DelegatingMetaClass
metaMethod
- The MetaMethod to addpublic void addMetaBeanProperty(MetaBeanProperty metaBeanProperty)
MutableMetaClass
addMetaBeanProperty
in interface MutableMetaClass
addMetaBeanProperty
in class DelegatingMetaClass
metaBeanProperty
- The MetaBeanProperty instancepublic boolean equals(java.lang.Object obj)
equals
in class DelegatingMetaClass