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 |
|---|---|
| public void | addMetaBeanProperty(MetaBeanProperty
The MetaBeanProperty instance metaBeanProperty)Adds a new MetaBeanProperty to the MetaClass |
| public void | |
| public void | addNewInstanceMethod(Method
the method to be added method)adds a new instance method to this MetaClass. |
| public void | |
| public boolean |
| addMetaBeanProperty | back to summary |
|---|---|
| public void addMetaBeanProperty(MetaBeanProperty metaBeanProperty) Adds a new MetaBeanProperty to the MetaClass
| |
| addMetaMethod | back to summary |
|---|---|
| public void addMetaMethod(MetaMethod metaMethod) Adds a new MetaMethod to the MetaClass
| |
| addNewInstanceMethod | back to summary |
|---|---|
| public void addNewInstanceMethod(Method method) adds 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.
| |
| addNewStaticMethod | back to summary |
|---|---|
| public void addNewStaticMethod(Method method) adds a new static method to this MetaClass. This is only possible as long as initialise was not called.
| |
| isModified | back to summary |
|---|---|
| public boolean isModified() Return whether the MetaClass has been modified or not
| |