Class ClassImposterizer
java.lang.Object
org.powermock.api.mockito.repackaged.ClassImposterizer
Inspired on jMock (thanks jMock guys!!!)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final net.sf.cglib.proxy.CallbackFilter
private final org.mockito.internal.creation.instance.Instantiator
private static final net.sf.cglib.core.NamingPolicy
-
Constructor Summary
ConstructorsConstructorDescriptionClassImposterizer
(org.mockito.internal.creation.instance.Instantiator instantiator) -
Method Summary
Modifier and TypeMethodDescriptionprivate Object
createProxy
(Class<net.sf.cglib.proxy.Factory> proxyClass, net.sf.cglib.proxy.MethodInterceptor interceptor) Class<net.sf.cglib.proxy.Factory>
createProxyClass
(Class<?> mockedType, Class<?>... interfaces) private static String
describeClass
(Class type) private static String
describeClass
(Object instance) <T> T
imposterise
(net.sf.cglib.proxy.MethodInterceptor interceptor, Class<T> mockedType, Class<?>... ancillaryTypes) <T> T
imposterise
(net.sf.cglib.proxy.MethodInterceptor interceptor, Class<T> mockedType, Collection<Class> ancillaryTypes) private Class<?>[]
void
setConstructorsAccessible
(Class<?> mockedType, boolean accessible)
-
Field Details
-
instantiator
private final org.mockito.internal.creation.instance.Instantiator instantiator -
NAMING_POLICY_THAT_ALLOWS_IMPOSTERISATION_OF_CLASSES_IN_SIGNED_PACKAGES
private static final net.sf.cglib.core.NamingPolicy NAMING_POLICY_THAT_ALLOWS_IMPOSTERISATION_OF_CLASSES_IN_SIGNED_PACKAGES -
IGNORE_BRIDGE_METHODS
private static final net.sf.cglib.proxy.CallbackFilter IGNORE_BRIDGE_METHODS
-
-
Constructor Details
-
ClassImposterizer
public ClassImposterizer(org.mockito.internal.creation.instance.Instantiator instantiator)
-
-
Method Details
-
imposterise
public <T> T imposterise(net.sf.cglib.proxy.MethodInterceptor interceptor, Class<T> mockedType, Collection<Class> ancillaryTypes) -
imposterise
-
describeClass
-
describeClass
-
setConstructorsAccessible
-
createProxyClass
-
createProxy
-
prepend
-