public interface MutableMetaClass extends MetaClass
Whether a MetaClass allows mutation is up to the MetaClass itself and considerations of Thread safety need to be taken into account when making a MetaClass mutable
The default implementation allows mutation of MetaClass instances before initialisation (before the initialize() method is called) but not after, thus ensuring Thread safety once a MetaClass has been constructed and placed in the registry
MetaClassImpl
,
MetaClass
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 |
isModified()
Return whether the MetaClass has been modified or not
|
getAttribute, getClassNode, getMetaMethods, getMethods, getProperties, getProperty, initialize, invokeMethod, invokeMissingMethod, invokeMissingProperty, pickMethod, selectConstructorAndTransformArguments, setAttribute, setProperty
getAttribute, getMetaMethod, getMetaProperty, getProperty, getStaticMetaMethod, getTheClass, hasProperty, invokeConstructor, invokeMethod, invokeMethod, invokeStaticMethod, respondsTo, respondsTo, setAttribute, setProperty
boolean isModified()
void addNewInstanceMethod(java.lang.reflect.Method method)
method
- the method to be addedvoid addNewStaticMethod(java.lang.reflect.Method method)
method
- the method to be addedvoid addMetaMethod(MetaMethod metaMethod)
metaMethod
- The MetaMethod to addvoid addMetaBeanProperty(MetaBeanProperty metaBeanProperty)
metaBeanProperty
- The MetaBeanProperty instance