Package: groovy.mock.interceptor

## [Java] Class MockProxyMetaClass

- groovy.mock.interceptor.MockProxyMetaClass

- 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

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `boolean` | `interceptConstruction` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class ProxyMetaClass` | `adaptee, interceptor`
    `class MetaClassImpl` | `EMPTY_ARGUMENTS, INVOKE_METHOD_METHOD, METHOD_MISSING, PROPERTY_MISSING, STATIC_METHOD_MISSING, STATIC_PROPERTY_MISSING, getPropertyMethod, invokeMethodMethod, isGroovyObject, isMap, metaMethodIndex, registry, setPropertyMethod, theCachedClass, theClass`

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `Object` | `property`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `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)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ProxyMetaClass` | `getAdaptee, getInstance, getInterceptor, getProperty, initialize, invokeConstructor, invokeMethod, invokeMethod, invokeStaticMethod, setAdaptee, setInterceptor, setProperty, use, use`
    `class MetaClassImpl` | `addMetaBeanProperty, addMetaMethod, addMetaMethodToIndex, addNewInstanceMethod, addNewStaticMethod, applyPropertyDescriptors, checkIfGroovyObjectMethod, checkInitalised, chooseMethod, clearInvocationCaches, createConstructorSite, createErrorMessageForAmbiguity, createPogoCallCurrentSite, createPogoCallSite, createPojoCallSite, createStaticSite, createTransformMetaMethod, doChooseMostSpecificParams, 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, handleMatches, hasCustomInvokeMethod, hasCustomStaticInvokeMethod, hasProperty, incVersion, initialize, invokeConstructor, invokeMethod, invokeMethod, invokeMethod, invokeMissingMethod, invokeMissingProperty, invokeStaticMethod, invokeStaticMissingProperty, isGroovyObject, isInitialized, isModified, onGetPropertyFoundInHierarchy, onInvokeMethodFoundInHierarchy, onMixinMethodFound, onSetPropertyFoundInHierarchy, onSuperMethodFoundInHierarchy, onSuperPropertyFoundInHierarchy, pickMethod, respondsTo, respondsTo, retrieveConstructor, retrieveConstructor, retrieveStaticMethod, selectConstructorAndTransformArguments, setAttribute, setAttribute, setProperties, setProperty, setProperty, toString`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### public final boolean interceptConstruction

  - ### Property Detail

    - #### Object property

  - ### Method Detail

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

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

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

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

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

    - #### public Object invokeConstructor(Object[] arguments)

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

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

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

    - #### public static MockProxyMetaClass make(Class theClass)

      convenience factory method for the most usual case.

    - #### public static MockProxyMetaClass make(Class theClass, boolean interceptConstruction)

      convenience factory method allowing interceptConstruction to be set.

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