public class ProxyMetaClass
extends groovy.lang.MetaClassImpl
implements groovy.lang.AdaptingMetaClass
| Modifier and Type | Field and Description |
|---|---|
protected groovy.lang.MetaClass |
adaptee |
protected Interceptor |
interceptor |
EMPTY_ARGUMENTS, getPropertyMethod, INVOKE_METHOD_METHOD, invokeMethodMethod, isGroovyObject, isMap, metaMethodIndex, METHOD_MISSING, PROPERTY_MISSING, registry, setPropertyMethod, STATIC_METHOD_MISSING, STATIC_PROPERTY_MISSING, theCachedClass, theClass| Constructor and Description |
|---|
ProxyMetaClass(groovy.lang.MetaClassRegistry registry,
java.lang.Class<?> theClass,
groovy.lang.MetaClass adaptee) |
| Modifier and Type | Method and Description |
|---|---|
groovy.lang.MetaClass |
getAdaptee() |
static ProxyMetaClass |
getInstance(java.lang.Class<?> theClass)
convenience factory method for the most usual case.
|
Interceptor |
getInterceptor() |
java.lang.Object |
getProperty(java.lang.Class aClass,
java.lang.Object object,
java.lang.String property,
boolean b,
boolean b1)
Interceptors the call to getProperty if a PropertyAccessInterceptor is available.
|
java.lang.Object |
invokeConstructor(java.lang.Object[] arguments)
Call invokeConstructor on adaptee with logic like in MetaClass unless we have an Interceptor.
|
java.lang.Object |
invokeMethod(java.lang.Class aClass,
java.lang.Object object,
java.lang.String methodName,
java.lang.Object[] arguments,
boolean b,
boolean b1)
Call invokeMethod on adaptee with logic like in MetaClass unless we have an Interceptor.
|
java.lang.Object |
invokeStaticMethod(java.lang.Object object,
java.lang.String methodName,
java.lang.Object[] arguments)
Call invokeStaticMethod on adaptee with logic like in MetaClass unless we have an Interceptor.
|
void |
setAdaptee(groovy.lang.MetaClass adaptee) |
void |
setInterceptor(Interceptor interceptor) |
void |
setProperty(java.lang.Class aClass,
java.lang.Object object,
java.lang.String property,
java.lang.Object newValue,
boolean b,
boolean b1)
Interceptors the call to a property setter if a PropertyAccessInterceptor is available.
|
void |
use(groovy.lang.Closure closure)
Use the ProxyMetaClass for the given Closure.
|
void |
use(groovy.lang.GroovyObject object,
groovy.lang.Closure closure)
Use the ProxyMetaClass for the given Closure.
|
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, getMethods, getMethodWithCaching, getMethodWithoutCaching, getProperties, getProperty, getRegistry, getStaticMetaMethod, getSubclassMetaMethods, getSuperClasses, getTheCachedClass, getTheClass, getVersion, hasCustomInvokeMethod, hasCustomStaticInvokeMethod, hasProperty, incVersion, initialize, invokeMethod, invokeMethod, invokeMissingMethod, invokeMissingProperty, invokeStaticMissingProperty, isGroovyObject, isInitialized, isModified, onGetPropertyFoundInHierarchy, onInvokeMethodFoundInHierarchy, onMixinMethodFound, onSetPropertyFoundInHierarchy, onSuperMethodFoundInHierarchy, onSuperPropertyFoundInHierarchy, pickMethod, respondsTo, respondsTo, retrieveConstructor, retrieveConstructor, retrieveStaticMethod, selectConstructorAndTransformArguments, setAttribute, setAttribute, setProperties, setProperty, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected groovy.lang.MetaClass adaptee
protected Interceptor interceptor
public ProxyMetaClass(groovy.lang.MetaClassRegistry registry,
java.lang.Class<?> theClass,
groovy.lang.MetaClass adaptee)
adaptee - the MetaClass to decorate with interceptabilityregistry - The MetaClassRegistry instancetheClass - The class to apply this ProxyMetaClass tojava.beans.IntrospectionException - Thrown when the class cannot be introspectedpublic groovy.lang.MetaClass getAdaptee()
getAdaptee in interface groovy.lang.AdaptingMetaClasspublic void setAdaptee(groovy.lang.MetaClass adaptee)
setAdaptee in interface groovy.lang.AdaptingMetaClassadaptee - the adaptee to setpublic static ProxyMetaClass getInstance(java.lang.Class<?> theClass)
theClass - The class to create a ProxyMetaClass forpublic void use(groovy.lang.Closure closure)
closure - piece of code to be executed with registered ProxyMetaClasspublic void use(groovy.lang.GroovyObject object,
groovy.lang.Closure closure)
closure - piece of code to be executed with ProxyMetaClassobject - The GroovyObject to use this ProxyMetaClass withpublic Interceptor getInterceptor()
public void setInterceptor(Interceptor interceptor)
interceptor - may be null to reset any interceptionpublic java.lang.Object invokeMethod(java.lang.Class aClass,
java.lang.Object object,
java.lang.String methodName,
java.lang.Object[] arguments,
boolean b,
boolean b1)
invokeMethod in interface groovy.lang.MetaClassinvokeMethod in class groovy.lang.MetaClassImplpublic java.lang.Object invokeStaticMethod(java.lang.Object object,
java.lang.String methodName,
java.lang.Object[] arguments)
invokeStaticMethod in interface groovy.lang.MetaObjectProtocolinvokeStaticMethod in class groovy.lang.MetaClassImplpublic java.lang.Object invokeConstructor(java.lang.Object[] arguments)
invokeConstructor in interface groovy.lang.MetaObjectProtocolinvokeConstructor in class groovy.lang.MetaClassImplpublic java.lang.Object getProperty(java.lang.Class aClass,
java.lang.Object object,
java.lang.String property,
boolean b,
boolean b1)
getProperty in interface groovy.lang.MetaClassgetProperty in class groovy.lang.MetaClassImplobject - the object to invoke the getter onproperty - the property namepublic void setProperty(java.lang.Class aClass,
java.lang.Object object,
java.lang.String property,
java.lang.Object newValue,
boolean b,
boolean b1)
setProperty in interface groovy.lang.MetaClasssetProperty in class groovy.lang.MetaClassImplobject - The object to invoke the setter onproperty - The property name to setnewValue - The new value of the property