|
Groovy 1.7.8 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovy.lang.MetaClassImpl
groovy.lang.ProxyMetaClass
groovy.mock.interceptor.MockProxyMetaClass
public 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.
| Field Summary | |
|---|---|
boolean |
interceptConstruction
|
| Fields inherited from class ProxyMetaClass | |
|---|---|
| adaptee, interceptor |
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class ProxyMetaClass | |
|---|---|
| getAdaptee, getInstance, getInterceptor, getProperty, initialize, invokeConstructor, invokeMethod, invokeStaticMethod, setAdaptee, setInterceptor, setProperty, use, use |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
public final boolean interceptConstruction
| Method Detail |
|---|
public def MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee)
adaptee - the MetaClass to decorate with interceptability
public def MockProxyMetaClass(MetaClassRegistry registry, Class theClass, MetaClass adaptee, boolean interceptConstruction)
adaptee - the MetaClass to decorate with interceptability
public Object getProperty(Class aClass, Object object, String property, boolean b, boolean b1)
public Object invokeConstructor(Object[] arguments)
public Object invokeMethod(Object object, String methodName, Object[] arguments)
public Object invokeStaticMethod(Object object, String methodName, Object[] arguments)
public static MockProxyMetaClass make(Class theClass)
public static MockProxyMetaClass make(Class theClass, boolean interceptConstruction)
public void setProperty(Class aClass, Object object, String property, Object newValue, boolean b, boolean b1)
Copyright © 2003-2010 The Codehaus. All rights reserved.