Groovy 1.7.0

groovy.mock.interceptor
Class MockProxyMetaClass

java.lang.Object
  groovy.lang.MetaClassImpl
      groovy.lang.ProxyMetaClass
          groovy.mock.interceptor.MockProxyMetaClass

class MockProxyMetaClass
extends ProxyMetaClass

The ProxyMetaClass for the MockInterceptor. Instance and class methods are intercepted, but constructors are not to allow mocking of aggregated objects.

author:
Dierk Koenig


Field Summary
 
Fields inherited from class ProxyMetaClass
adaptee, interceptor
 
Fields inherited from class MetaClassImpl
INVOKE_METHOD_METHOD, METHOD_MISSING, PROPERTY_MISSING, STATIC_METHOD_MISSING, STATIC_PROPERTY_MISSING, getPropertyMethod, invokeMethodMethod, isGroovyObject, isMap, metaMethodIndex, registry, setPropertyMethod, theCachedClass, theClass
 
Constructor Summary
MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee)

 
Method Summary
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

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.

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

 
Methods inherited from class ProxyMetaClass
getAdaptee, getInstance, getInterceptor, getProperty, initialize, invokeConstructor, invokeMethod, invokeStaticMethod, setAdaptee, setInterceptor, setProperty, use, use
 
Methods inherited from class MetaClassImpl
getMetaMethod, getMetaProperty, getStaticMetaMethod, getSuperClasses, getTheCachedClass, getTheClass, hasProperty, isGroovyObject, respondsTo, respondsTo
 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Constructor Detail

MockProxyMetaClass

public MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee)
param:
adaptee the MetaClass to decorate with interceptability


 
Method Detail

getProperty

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


invokeConstructor

public Object invokeConstructor(Object[] arguments)
Unlike general impl in superclass, ctors are not intercepted but relayed


invokeMethod

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


invokeStaticMethod

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


make

public static MockProxyMetaClass make(Class theClass)
convenience factory method for the most usual case.


setProperty

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


 

Copyright © 2003-2009 The Codehaus. All rights reserved.