Package | Description |
---|---|
org.mockito.cglib.proxy | |
org.mockito.internal.creation |
Mock object creation.
|
org.mockito.internal.creation.jmock |
Borrowed from jmock codebase
|
Modifier and Type | Interface and Description |
---|---|
interface |
Dispatcher
Dispatching
Enhancer callback. |
interface |
FixedValue
Enhancer callback that simply returns the value to return
from the proxied method. |
interface |
InvocationHandler
InvocationHandler replacement (unavailable under JDK 1.2). |
interface |
LazyLoader
Lazy-loading
Enhancer callback. |
interface |
MethodInterceptor
General-purpose
Enhancer callback which provides for "around advice". |
interface |
NoOp
Methods using this
Enhancer callback will delegate directly to the
default (super) implementation in the base class. |
interface |
ProxyRefDispatcher
Dispatching
Enhancer callback. |
Modifier and Type | Method and Description |
---|---|
Callback |
Factory.getCallback(int index)
Return the
Callback implementation at the specified index. |
Callback[] |
Factory.getCallbacks()
Get the current set of callbacks for ths object.
|
Callback[] |
CallbackHelper.getCallbacks() |
Modifier and Type | Method and Description |
---|---|
static Object |
Enhancer.create(Class type,
Callback callback)
Helper method to create an intercepted object.
|
static Object |
Enhancer.create(Class superclass,
Class[] interfaces,
Callback callback)
Helper method to create an intercepted object.
|
static Object |
Enhancer.create(Class superclass,
Class[] interfaces,
CallbackFilter filter,
Callback[] callbacks)
Helper method to create an intercepted object.
|
Object |
Factory.newInstance(Callback callback)
Creates new instance of the same type, using the no-arg constructor.
|
Object |
Factory.newInstance(Callback[] callbacks)
Creates new instance of the same type, using the no-arg constructor.
|
Object |
Factory.newInstance(Class[] types,
Object[] args,
Callback[] callbacks)
Creates a new instance of the same type, using the constructor
matching the given signature.
|
static void |
Enhancer.registerCallbacks(Class generatedClass,
Callback[] callbacks)
Call this method to register the
Callback array to use before
creating a new instance of the generated class via reflection. |
static void |
Enhancer.registerStaticCallbacks(Class generatedClass,
Callback[] callbacks)
Similar to
Enhancer.registerCallbacks(java.lang.Class, org.mockito.cglib.proxy.Callback[]) , but suitable for use
when multiple threads will be creating instances of the generated class. |
void |
Enhancer.setCallback(Callback callback)
Set the single
Callback to use. |
void |
Factory.setCallback(int index,
Callback callback)
Set the callback for this object for the given type.
|
void |
Factory.setCallbacks(Callback[] callbacks)
Replace all of the callbacks for this object at once.
|
void |
Enhancer.setCallbacks(Callback[] callbacks)
Set the array of callbacks to use.
|
Modifier and Type | Class and Description |
---|---|
class |
MethodInterceptorFilter |
Modifier and Type | Class and Description |
---|---|
class |
SerializableNoOp |
Modifier and Type | Field and Description |
---|---|
static Callback |
SerializableNoOp.SERIALIZABLE_INSTANCE |
Copyright © 2018. All rights reserved.