public class MockProxyMetaClass
extends ProxyMetaClass
| Modifiers | Name | Description |
|---|---|---|
boolean |
interceptConstruction |
Indicates whether constructor invocations should be intercepted. |
| 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 |
| Constructor and description |
|---|
MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee)
|
MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee, boolean interceptConstruction)
|
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
getProperty(Class aClass, Object object, String property, boolean b, boolean b1)Intercepts a property read and delegates to the adaptee when no custom value is supplied. |
|
public Object |
invokeConstructor(Object[] arguments)Intercepts or delegates constructor invocation depending on interceptConstruction. |
|
public Object |
invokeMethod(Object object, String methodName, Object[] arguments)Intercepts an instance method invocation and delegates to the adaptee when requested. |
|
public Object |
invokeMethod(Class sender, Object object, String methodName, Object[] arguments, boolean isCallToSuper, boolean fromInsideClass)Intercepts an instance method invocation with sender metadata and delegates when requested. |
|
public Object |
invokeStaticMethod(Object object, String methodName, Object[] arguments)Intercepts a static method invocation and delegates to the adaptee when requested. |
|
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)Intercepts a property write and delegates to the adaptee when no custom handling is supplied. |
Indicates whether constructor invocations should be intercepted.
adaptee - the MetaClass to decorate with interceptability
adaptee - the MetaClass to decorate with interceptabilityIntercepts a property read and delegates to the adaptee when no custom value is supplied.
aClass - the dispatch classobject - the receiver of the property accessproperty - the property nameb - implementation-specific flag forwarded to the adapteeb1 - implementation-specific flag forwarded to the adapteeIntercepts or delegates constructor invocation depending on interceptConstruction.
arguments - the constructor argumentsIntercepts an instance method invocation and delegates to the adaptee when requested.
object - the receiver of the method callmethodName - the method namearguments - the invocation argumentsIntercepts an instance method invocation with sender metadata and delegates when requested.
sender - the sender classobject - the receiver of the method callmethodName - the method namearguments - the invocation argumentsisCallToSuper - whether the call targets a superclass implementationfromInsideClass - whether the call originates from inside the declaring classIntercepts a static method invocation and delegates to the adaptee when requested.
object - the static receivermethodName - the method namearguments - the invocation argumentsconvenience factory method for the most usual case.
convenience factory method allowing interceptConstruction to be set.
Intercepts a property write and delegates to the adaptee when no custom handling is supplied.
aClass - the dispatch classobject - the receiver of the property accessproperty - the property namenewValue - the value to assignb - implementation-specific flag forwarded to the adapteeb1 - implementation-specific flag forwarded to the adapteeCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.