| java.lang.Object groovy.lang.MetaClass groovy.lang.MetaClassImpl groovy.lang.ProxyMetaClass
All known Subclasses: groovy.mock.interceptor.MockProxyMetaClass,
ProxyMetaClass | public class ProxyMetaClass extends MetaClassImpl (Code) | | As subclass of MetaClass, ProxyMetaClass manages calls from Groovy Objects to POJOs.
It enriches MetaClass with the feature of making method invokations interceptable by
an Interceptor. To this end, it acts as a decorator (decorator pattern) allowing
to add or withdraw this feature at runtime.
See groovy/lang/InterceptorTest.groovy for details.
author: Dierk Koenig |
getInterceptor | public Interceptor getInterceptor()(Code) | | the interceptor in use or null if no interceptor is used |
initialize | public synchronized void initialize()(Code) | | |
invokeConstructor | public Object invokeConstructor(Object[] arguments)(Code) | | Call invokeConstructor on adaptee with logic like in MetaClass unless we have an Interceptor.
With Interceptor the call is nested in its beforeInvoke and afterInvoke methods.
The method call is suppressed if Interceptor.doInvoke() returns false.
See Interceptor for details.
|
invokeMethod | public Object invokeMethod(Object object, String methodName, Object[] arguments)(Code) | | Call invokeMethod on adaptee with logic like in MetaClass unless we have an Interceptor.
With Interceptor the call is nested in its beforeInvoke and afterInvoke methods.
The method call is suppressed if Interceptor.doInvoke() returns false.
See Interceptor for details.
|
invokeStaticMethod | public Object invokeStaticMethod(Object object, String methodName, Object[] arguments)(Code) | | Call invokeStaticMethod on adaptee with logic like in MetaClass unless we have an Interceptor.
With Interceptor the call is nested in its beforeInvoke and afterInvoke methods.
The method call is suppressed if Interceptor.doInvoke() returns false.
See Interceptor for details.
|
setInterceptor | public void setInterceptor(Interceptor interceptor)(Code) | | Parameters: interceptor - may be null to reset any interception |
use | public void use(Closure closure)(Code) | | Use the ProxyMetaClass for the given Closure.
Cares for balanced register/unregister.
Parameters: closure - piece of code to be executed with registered ProxyMetaClass |
use | public void use(GroovyObject object, Closure closure)(Code) | | Use the ProxyMetaClass for the given Closure.
Cares for balanced setting/unsetting ProxyMetaClass.
Parameters: closure - piece of code to be executed with ProxyMetaClass |
Methods inherited from groovy.lang.MetaClassImpl | protected void addMetaMethod(MetaMethod method)(Code)(Java Doc) public void addNewInstanceMethod(Method method)(Code)(Java Doc) public void addNewStaticMethod(Method method)(Code)(Java Doc) protected void cacheInstanceMethod(MethodKey key, MetaMethod method)(Code)(Java Doc) protected void cacheStaticMethod(MethodKey key, MetaMethod method)(Code)(Java Doc) protected void checkInitalised()(Code)(Java Doc) protected void clearInvocationCaches()(Code)(Java Doc) public Object getAttribute(Class sender, Object object, String attribute, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc) public Object getAttribute(Object object, String attribute)(Code)(Java Doc) public ClassNode getClassNode()(Code)(Java Doc) public List getMetaMethods()(Code)(Java Doc) public MetaMethod getMethodWithCaching(Class sender, String methodName, Class[] arguments, boolean isCallToSuper)(Code)(Java Doc) public MetaMethod getMethodWithoutCaching(Class sender, String methodName, Class[] arguments, boolean isCallToSuper)(Code)(Java Doc) public List getMethods()(Code)(Java Doc) public List getProperties()(Code)(Java Doc) public Object getProperty(Class sender, Object object, String name, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc) public Object getProperty(Object object, String property)(Code)(Java Doc) public synchronized void initialize()(Code)(Java Doc) public Object invokeConstructor(Object[] arguments)(Code)(Java Doc) public Object invokeMethod(Object object, String methodName, Object[] originalArguments)(Code)(Java Doc) public Object invokeMethod(Class sender, Object object, String methodName, Object[] originalArguments, boolean isCallToSuper, boolean fromInsideClass)(Code)(Java Doc) public Object invokeStaticMethod(Object object, String methodName, Object[] arguments)(Code)(Java Doc) protected boolean isInitialized()(Code)(Java Doc) public MetaMethod pickMethod(String methodName, Class[] arguments)(Code)(Java Doc) public Constructor retrieveConstructor(Class[] arguments)(Code)(Java Doc) protected MetaMethod retrieveMethod(String methodName, Class[] arguments)(Code)(Java Doc) public MetaMethod retrieveStaticMethod(String methodName, Class[] arguments)(Code)(Java Doc) public int selectConstructorAndTransformArguments(int numberOfCosntructors, Object[] arguments)(Code)(Java Doc) public void setAttribute(Class sender, Object object, String attribute, Object newValue, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc) public void setAttribute(Object object, String attribute, Object newValue)(Code)(Java Doc) public void setProperties(Object bean, Map map)(Code)(Java Doc) public void setProperty(Class sender, Object object, String name, Object newValue, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc) public void setProperty(Object object, String property, Object newValue)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
Methods inherited from groovy.lang.MetaClass | abstract public void addNewInstanceMethod(Method method)(Code)(Java Doc) abstract public void addNewStaticMethod(Method method)(Code)(Java Doc) public Object getAttribute(Class sender, Object receiver, String messageName, boolean useSuper)(Code)(Java Doc) abstract public Object getAttribute(Object object, String attribute)(Code)(Java Doc) abstract public ClassNode getClassNode()(Code)(Java Doc) abstract public List getMetaMethods()(Code)(Java Doc) abstract public List getMethods()(Code)(Java Doc) abstract public List getProperties()(Code)(Java Doc) public Object getProperty(Class sender, Object receiver, String messageName, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc) abstract public Object getProperty(Object object, String property)(Code)(Java Doc) abstract public void initialize()(Code)(Java Doc) abstract public Object invokeConstructor(Object[] arguments)(Code)(Java Doc) public Object invokeConstructorAt(Class at, Object[] arguments)(Code)(Java Doc) public Object invokeMethod(Object object, String methodName, Object arguments)(Code)(Java Doc) public Object invokeMethod(Class sender, Object receiver, String methodName, Object[] arguments, boolean isCallToSuper, boolean fromInsideClass)(Code)(Java Doc) abstract public Object invokeMethod(Object object, String methodName, Object[] arguments)(Code)(Java Doc) public Object invokeMissingMethod(Object instance, String methodName, Object[] arguments)(Code)(Java Doc) abstract public Object invokeStaticMethod(Object object, String methodName, Object[] arguments)(Code)(Java Doc) public boolean isGroovyObject()(Code)(Java Doc) public static boolean isUseReflection()(Code)(Java Doc) abstract public MetaMethod pickMethod(String methodName, Class[] arguments)(Code)(Java Doc) protected MetaMethod retrieveMethod(String methodName, Class[] arguments)(Code)(Java Doc) public void setAttribute(Class sender, Object receiver, String messageName, Object messageValue, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc) abstract public void setAttribute(Object object, String attribute, Object newValue)(Code)(Java Doc) public void setProperty(Class sender, Object receiver, String messageName, Object messageValue, boolean useSuper, boolean fromInsideClass)(Code)(Java Doc) abstract public void setProperty(Object object, String property, Object newValue)(Code)(Java Doc) public static void setUseReflection(boolean useReflection)(Code)(Java Doc)
|
|
|