Groovy 1.7.10

## groovy.mock.interceptor
[Java] Class MockProxyMetaClass

    java.lang.Object
      groovy.lang.MetaClassImpl
          groovy.lang.ProxyMetaClass
              groovy.mock.interceptor.MockProxyMetaClass

    public class MockProxyMetaClass
    extends ProxyMetaClass

The ProxyMetaClass for the MockInterceptor. Instance and class methods are intercepted, but constructors are not to allow mocking of aggregated objects.

Authors:
  Dierk Koenig

Field Summary
`boolean` | `interceptConstruction`

Fields inherited from class ProxyMetaClass
adaptee, interceptor

Fields inherited from class MetaClassImpl
INVOKE_METHOD_METHOD, METHOD_MISSING, PROPERTY_MISSING, STATIC_METHOD_MISSING, STATIC_PROPERTY_MISSING, getPropertyMethod, invokeMethodMethod, isGroovyObject, isMap, metaMethodIndex, registry, setPropertyMethod, theCachedClass, theClass

Method Summary
`def` | `MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee)` @param adaptee the MetaClass to decorate with interceptability
`def` | `MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee, boolean interceptConstruction)` @param adaptee the MetaClass to decorate with interceptability
`Object` | `getProperty(Class aClass, Object object, String property, boolean b, boolean b1)`
`Object` | `invokeConstructor(Object[] arguments)` Unlike general impl in superclass, ctors are not intercepted but relayed unless interceptConstruction is set.
`Object` | `invokeMethod(Object object, String methodName, Object[] arguments)`
`Object` | `invokeStaticMethod(Object object, String methodName, Object[] arguments)`
`static MockProxyMetaClass` | `make(Class theClass)` convenience factory method for the most usual case.
`static MockProxyMetaClass` | `make(Class theClass, boolean interceptConstruction)` convenience factory method allowing interceptConstruction to be set.
`void` | `setProperty(Class aClass, Object object, String property, Object newValue, boolean b, boolean b1)`

Methods inherited from class ProxyMetaClass
getAdaptee, getInstance, getInterceptor, getProperty, initialize, invokeConstructor, invokeMethod, invokeStaticMethod, setAdaptee, setInterceptor, setProperty, use, use

Methods inherited from class MetaClassImpl

addMetaBeanProperty, addMetaMethod, addMetaMethodToIndex, addNewInstanceMethod, addNewStaticMethod, applyPropertyDescriptors, checkIfGroovyObjectMethod, checkInitalised, chooseMethod, clearInvocationCaches, createConstructorSite, createPogoCallCurrentSite, createPogoCallSite, createPojoCallSite, createStaticSite, dropMethodCache, dropStaticMethodCache, findMethodInClassHierarchy, findMixinMethod, findOwnMethod, findPropertyInClassHierarchy, getAdditionalMetaMethods, getAttribute, getAttribute, getAttribute, getClassInfo, getClassNode, getEffectiveGetMetaProperty, getMetaMethod, getMetaMethods, getMetaProperty, getMethodWithCaching, getMethodWithoutCaching, getMethods, getProperties, getProperty, getProperty, getStaticMetaMethod, getSubclassMetaMethods, getSuperClasses, getTheCachedClass, getTheClass, getVersion, hasProperty, incVersion, initialize, invokeConstructor, invokeConstructorAt, invokeMethod, invokeMethod, invokeMethod, invokeMissingMethod, invokeMissingProperty, invokeStaticMethod, invokeStaticMissingProperty, isGroovyObject, isInitialized, isModified, onGetPropertyFoundInHierarchy, onInvokeMethodFoundInHierarchy, onMixinMethodFound, onSetPropertyFoundInHierarchy, onSuperMethodFoundInHierarchy, onSuperPropertyFoundInHierarchy, pickMethod, respondsTo, respondsTo, retrieveConstructor, retrieveMethod, retrieveStaticMethod, selectConstructorAndTransformArguments, setAttribute, setAttribute, setProperties, setProperty, setProperty, toString

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### interceptConstruction

    public final boolean interceptConstruction

Method Detail

### MockProxyMetaClass

    public def MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee)

  Parameters:
    `adaptee` - the MetaClass to decorate with interceptability

### MockProxyMetaClass

    public def MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee, boolean interceptConstruction)

  Parameters:
    `adaptee` - the MetaClass to decorate with interceptability

### getProperty

    public Object getProperty(Class aClass, Object object, String property, boolean b, boolean b1)

### invokeConstructor

    public Object invokeConstructor(Object[] arguments)

  Unlike general impl in superclass, ctors are not intercepted but relayed unless interceptConstruction is set.

### invokeMethod

    public Object invokeMethod(Object object, String methodName, Object[] arguments)

### invokeStaticMethod

    public Object invokeStaticMethod(Object object, String methodName, Object[] arguments)

### make

    public static MockProxyMetaClass make(Class theClass)

  convenience factory method for the most usual case.

### make

    public static MockProxyMetaClass make(Class theClass, boolean interceptConstruction)

  convenience factory method allowing interceptConstruction to be set.

### setProperty

    public void setProperty(Class aClass, Object object, String property, Object newValue, boolean b, boolean b1)

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