Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`java.lang.Object` | `MockProxyMetaClass(MetaClassRegistry registry, java.lang.Class theClass, MetaClass adaptee)` @param adaptee the MetaClass to decorate with interceptability
`java.lang.Object` | `MockProxyMetaClass(MetaClassRegistry registry, java.lang.Class theClass, MetaClass adaptee, boolean interceptConstruction)` @param adaptee the MetaClass to decorate with interceptability
`java.lang.Object` | `getProperty(java.lang.Class aClass, java.lang.Object object, java.lang.String property, boolean b, boolean b1)`
`java.lang.Object` | `invokeConstructor(java.lang.Object[] arguments)` Unlike general impl in superclass, ctors are not intercepted but relayed unless interceptConstruction is set.
`java.lang.Object` | `invokeMethod(java.lang.Object object, java.lang.String methodName, java.lang.Object[] arguments)`
`java.lang.Object` | `invokeStaticMethod(java.lang.Object object, java.lang.String methodName, java.lang.Object[] arguments)`
`static MockProxyMetaClass` | `make(java.lang.Class theClass)` convenience factory method for the most usual case.
`static MockProxyMetaClass` | `make(java.lang.Class theClass, boolean interceptConstruction)` convenience factory method allowing interceptConstruction to be set.
`void` | `setProperty(java.lang.Class aClass, java.lang.Object object, java.lang.String property, java.lang.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, getRegistry, getStaticMetaMethod, getSubclassMetaMethods, getSuperClasses, getTheCachedClass, getTheClass, getVersion, hasProperty, incVersion, initialize, invokeConstructor, invokeMethod, invokeMethod, invokeMethod, invokeMissingMethod, invokeMissingProperty, invokeStaticMethod, invokeStaticMissingProperty, isGroovyObject, isInitialized, isModified, onGetPropertyFoundInHierarchy, onInvokeMethodFoundInHierarchy, onMixinMethodFound, onSetPropertyFoundInHierarchy, onSuperMethodFoundInHierarchy, onSuperPropertyFoundInHierarchy, pickMethod, respondsTo, respondsTo, retrieveConstructor, retrieveStaticMethod, selectConstructorAndTransformArguments, setAttribute, setAttribute, setProperties, setProperty, setProperty, toString

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### interceptConstruction

    public final boolean interceptConstruction

Method Detail

### MockProxyMetaClass

    public java.lang.Object MockProxyMetaClass(MetaClassRegistry registry, java.lang.Class theClass, MetaClass adaptee)

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

### MockProxyMetaClass

    public java.lang.Object MockProxyMetaClass(MetaClassRegistry registry, java.lang.Class theClass, MetaClass adaptee, boolean interceptConstruction)

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

### getProperty

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

### invokeConstructor

    public java.lang.Object invokeConstructor(java.lang.Object[] arguments)

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

### invokeMethod

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

### invokeStaticMethod

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

### make

    public static MockProxyMetaClass make(java.lang.Class theClass)

  convenience factory method for the most usual case.

### make

    public static MockProxyMetaClass make(java.lang.Class theClass, boolean interceptConstruction)

  convenience factory method allowing interceptConstruction to be set.

### setProperty

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

Groovy Documentation