|
|||||||||
| PREV CLASS NEXT CLASS | 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
The ProxyMetaClass for the MockInterceptor. Instance and class methods are intercepted, but constructors are not to allow mocking of aggregated objects.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class groovy.lang.MetaClassImpl |
|---|
groovy.lang.MetaClassImpl.Index |
| Field Summary | |
|---|---|
boolean |
interceptConstruction
|
| Fields inherited from class groovy.lang.ProxyMetaClass |
|---|
adaptee, interceptor |
| Fields inherited from class groovy.lang.MetaClassImpl |
|---|
getPropertyMethod, INVOKE_METHOD_METHOD, invokeMethodMethod, isGroovyObject, isMap, metaMethodIndex, METHOD_MISSING, PROPERTY_MISSING, registry, setPropertyMethod, STATIC_METHOD_MISSING, STATIC_PROPERTY_MISSING, theCachedClass, theClass |
| Constructor Summary | |
|---|---|
MockProxyMetaClass(groovy.lang.MetaClassRegistry registry,
Class theClass,
groovy.lang.MetaClass adaptee)
|
|
MockProxyMetaClass(groovy.lang.MetaClassRegistry registry,
Class theClass,
groovy.lang.MetaClass adaptee,
boolean interceptConstruction)
|
|
| 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 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 groovy.lang.ProxyMetaClass |
|---|
getAdaptee, getInstance, getInterceptor, initialize, setAdaptee, setInterceptor, use, use |
| Methods inherited from class groovy.lang.MetaClassImpl |
|---|
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, hasProperty, incVersion, invokeMethod, invokeMethod, invokeMissingMethod, invokeMissingProperty, invokeStaticMissingProperty, isGroovyObject, isInitialized, isModified, onGetPropertyFoundInHierarchy, onInvokeMethodFoundInHierarchy, onMixinMethodFound, onSetPropertyFoundInHierarchy, onSuperMethodFoundInHierarchy, onSuperPropertyFoundInHierarchy, pickMethod, respondsTo, respondsTo, retrieveConstructor, retrieveStaticMethod, selectConstructorAndTransformArguments, setAttribute, setAttribute, setProperties, setProperty, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface groovy.lang.MetaClass |
|---|
getAttribute, getClassNode, getMetaMethods, getMethods, getProperties, invokeMethod, invokeMissingMethod, invokeMissingProperty, pickMethod, selectConstructorAndTransformArguments, setAttribute |
| Methods inherited from interface groovy.lang.MetaObjectProtocol |
|---|
getAttribute, getMetaMethod, getMetaProperty, getProperty, getStaticMetaMethod, getTheClass, hasProperty, invokeMethod, respondsTo, respondsTo, setAttribute, setProperty |
| Field Detail |
|---|
public final boolean interceptConstruction
| Constructor Detail |
|---|
public MockProxyMetaClass(groovy.lang.MetaClassRegistry registry,
Class theClass,
groovy.lang.MetaClass adaptee)
throws IntrospectionException
adaptee - the MetaClass to decorate with interceptability
IntrospectionException
public MockProxyMetaClass(groovy.lang.MetaClassRegistry registry,
Class theClass,
groovy.lang.MetaClass adaptee,
boolean interceptConstruction)
throws IntrospectionException
adaptee - the MetaClass to decorate with interceptability
IntrospectionException| Method Detail |
|---|
public static MockProxyMetaClass make(Class theClass)
throws IntrospectionException
IntrospectionException
public static MockProxyMetaClass make(Class theClass,
boolean interceptConstruction)
throws IntrospectionException
IntrospectionException
public Object invokeMethod(Object object,
String methodName,
Object[] arguments)
invokeMethod in interface groovy.lang.MetaObjectProtocolinvokeMethod in class groovy.lang.ProxyMetaClass
public Object invokeStaticMethod(Object object,
String methodName,
Object[] arguments)
invokeStaticMethod in interface groovy.lang.MetaObjectProtocolinvokeStaticMethod in class groovy.lang.ProxyMetaClass
public Object getProperty(Class aClass,
Object object,
String property,
boolean b,
boolean b1)
getProperty in interface groovy.lang.MetaClassgetProperty in class groovy.lang.ProxyMetaClass
public void setProperty(Class aClass,
Object object,
String property,
Object newValue,
boolean b,
boolean b1)
setProperty in interface groovy.lang.MetaClasssetProperty in class groovy.lang.ProxyMetaClasspublic Object invokeConstructor(Object[] arguments)
invokeConstructor in interface groovy.lang.MetaObjectProtocolinvokeConstructor in class groovy.lang.ProxyMetaClass
|
Copyright © 2003-2012 The Codehaus. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||