The ProxyMetaClass for the MockInterceptor. Instance and class methods are intercepted, but constructors are not to allow mocking of aggregated objects.
Modifiers | Name | Description |
---|---|---|
boolean |
interceptConstruction |
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 |
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) |
adaptee
- the MetaClass to decorate with interceptability
adaptee
- the MetaClass to decorate with interceptabilityUnlike general impl in superclass, ctors are not intercepted but relayed unless interceptConstruction is set.
convenience factory method for the most usual case.
convenience factory method allowing interceptConstruction to be set.