Groovy 1.7.0

## groovy.lang
Interface MutableMetaClass

    groovy.lang.MetaObjectProtocol
      groovy.lang.MutableMetaClass
          groovy.lang.MetaClass

All Superinterfaces:
  MetaObjectProtocol, MetaClass

    interface MutableMetaClass
    extends MetaClass

An interface that defines methods that implementors of mutable Meta classes should specifiy. It provides operations to perform mutations on the MetaClass instance.

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

see:
  MetaClassImpl

see:
  MetaClass

author:
  Graeme Rocher

since:
  1.5

Method Summary
`void` | `addMetaBeanProperty(MetaBeanProperty metaBeanProperty)` Adds a new MetaBeanProperty to the MetaClass
`void` | `addMetaMethod(MetaMethod metaMethod)` Adds a new MetaMethod to the MetaClass
`void` | `addNewInstanceMethod(Method method)` adds a new instance method to this MetaClass.
`void` | `addNewStaticMethod(Method method)` adds a new static method to this MetaClass.
`boolean` | `isModified()` Return whether the MetaClass has been modified or not

Methods inherited from interface MetaClass
getAttribute, getClassNode, getMetaMethods, getMethods, getProperties, getProperty, initialize, invokeMethod, invokeMissingMethod, invokeMissingProperty, pickMethod, selectConstructorAndTransformArguments, setAttribute, setProperty

Methods inherited from interface MetaObjectProtocol
getAttribute, getMetaMethod, getMetaProperty, getMethods, getProperties, getProperty, getStaticMetaMethod, getTheClass, hasProperty, invokeConstructor, invokeMethod, invokeMethod, invokeStaticMethod, respondsTo, respondsTo, setAttribute, setProperty

Method Detail

### addMetaBeanProperty

    public void addMetaBeanProperty(MetaBeanProperty metaBeanProperty)

  Adds a new MetaBeanProperty to the MetaClass
  param:
    metaBeanProperty The MetaBeanProperty instance

### addMetaMethod

    public void addMetaMethod(MetaMethod metaMethod)

  Adds a new MetaMethod to the MetaClass
  param:
    metaMethod The MetaMethod to add

### addNewInstanceMethod

    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 initlise was called.
  param:
    method the method to be added

### addNewStaticMethod

    public void addNewStaticMethod(Method method)

  adds a new static method to this MetaClass. This is only possible as long as initilise was not called.
  param:
    method the method to be added

### isModified

    public boolean isModified()

  Return whether the MetaClass has been modified or not
  return:
    True if it has

Copyright © 2003-2009 The Codehaus. All rights reserved.