Class ClassImposteriser
java.lang.Object
org.jmock.lib.legacy.ClassImposteriser
- All Implemented Interfaces:
Imposteriser
Deprecated.
Java11 support is weak, Migrate to org.jmock.lib.imposters.ByteBuddyClassImposteriser
This class lets you imposterise abstract and concrete classes
without calling the constructors of the mocked class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final MethodDeprecated.private static final net.sf.cglib.proxy.CallbackFilterDeprecated.static final ImposteriserDeprecated.private static final net.sf.cglib.core.NamingPolicyDeprecated.private final org.objenesis.ObjenesisDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanImposterise(Class<?> type) Deprecated.Reports if the Imposteriser is able to imposterise a given type.private static MethodDeprecated.<T> Timposterise(Invokable mockObject, Class<T> mockedType, Class<?>... ancilliaryTypes) Deprecated.Creates an imposter for a given type that forwardsInvocations to anInvokableobject.private Class<?>[]Deprecated.private booleanprotectedPackageNamespace(Class<?> mockedType) Deprecated.private ObjectDeprecated.private Class<?> proxyClass(Class<?> possibleMockedType, Class<?>... ancilliaryTypes) Deprecated.private voidsetConstructorsAccessible(Class<?> mockedType, boolean accessible) Deprecated.private booleantoStringMethodIsFinal(Class<?> type) Deprecated.
-
Field Details
-
INSTANCE
Deprecated. -
FINALIZE_METHOD
Deprecated. -
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_PACKAGESDeprecated. -
IGNORED_METHODS
private static final net.sf.cglib.proxy.CallbackFilter IGNORED_METHODSDeprecated. -
objenesis
private final org.objenesis.Objenesis objenesisDeprecated.
-
-
Constructor Details
-
ClassImposteriser
private ClassImposteriser()Deprecated.
-
-
Method Details
-
canImposterise
Deprecated.Description copied from interface:ImposteriserReports if the Imposteriser is able to imposterise a given type.- Specified by:
canImposterisein interfaceImposteriser- Parameters:
type- The type in question.- Returns:
- True if this imposteriser can imposterise type, false otherwise.
-
imposterise
Deprecated.Description copied from interface:ImposteriserCreates an imposter for a given type that forwardsInvocations to anInvokableobject.- Specified by:
imposterisein interfaceImposteriser- Type Parameters:
T- The static type of the imposter that is created.- Parameters:
mockObject- The object that is to receive invocations forwarded from the imposter.mockedType- The class representing the static type of the imposter.ancilliaryTypes- Other types for the imposter. It must be possible to dynamically cast the imposter to these types. These types must all be interfaces because Java only allows single inheritance of classes.- Returns:
- A new imposter. The imposter must implement the mockedType and all the ancialliaryTypes.
-
toStringMethodIsFinal
Deprecated. -
setConstructorsAccessible
Deprecated. -
proxyClass
-
proxy
-
prepend
-
findFinalizeMethod
Deprecated. -
protectedPackageNamespace
Deprecated.
-