equals, hashCode, toString,
and finalize in a special way. Then, for other calls, it delegates to the mock handler.
| Modifier and Type | Field and Description |
|---|---|
| private final MockInvocationHandler | |
| private transient Method | |
| private transient Method | |
| private transient Method | |
| private final String | |
| private static final Predicate | |
| private static final long | |
| private transient Method |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static Method | |
| public MockInvocationHandler | |
| public String | |
| public final Object | invoke(Object
the proxy instance that the method was invoked on proxy, Method the method, Object[] Method instance corresponding to
the interface method invoked on the proxy instance. The declaring
class of the Method object will be the interface that
the method was declared in, which may be a superinterface of the
proxy interface that the proxy class inherits the method through.an array of objects containing the values of the
arguments passed in the method invocation on the proxy instance,
or args)null if interface method takes no arguments.
Arguments of primitive types are wrapped in instances of the
appropriate primitive wrapper class, such as
java.lang.Integer or java.lang.Boolean.Implements java. |
| private String | |
| private void | |
| private void |
| delegate | back to summary |
|---|---|
| private final MockInvocationHandler delegate | |
| equalsMethod | back to summary |
|---|---|
| private transient Method equalsMethod | |
| finalizeMethod | back to summary |
|---|---|
| private transient Method finalizeMethod | |
| hashCodeMethod | back to summary |
|---|---|
| private transient Method hashCodeMethod | |
| name | back to summary |
|---|---|
| private final String name | |
| NOT_PRIVATE | back to summary |
|---|---|
| private static final Predicate<Method> NOT_PRIVATE | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| toStringMethod | back to summary |
|---|---|
| private transient Method toStringMethod | |
| ObjectMethodsFilter | back to summary |
|---|---|
| public ObjectMethodsFilter(Class<?> toMock, MockInvocationHandler delegate, String name) | |
| extractMethod | back to summary |
|---|---|
| private static Method extractMethod(Class<?> toMock, String name, Class<?>... params) throws NoSuchMethodException | |
| getDelegate | back to summary |
|---|---|
| public MockInvocationHandler getDelegate() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| invoke | back to summary |
|---|---|
| public final Object invoke(Object proxy, Method method, Object[] args) throws Throwable Implements java. Doc from java. Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.
| |
| mockToString | back to summary |
|---|---|
| private String mockToString(Object proxy) | |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException | |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream stream) throws IOException | |