- java.lang.Object
-
- org.easymock.internal.ObjectMethodsFilter
-
- All Implemented Interfaces:
Serializable,InvocationHandler
public final class ObjectMethodsFilter extends Object implements InvocationHandler, Serializable
The filter catching all calls to the mock. It handlesequals,hashCode,toString, andfinalizein a special way. Then, for other calls, it delegates to the mock handler.- Author:
- OFFIS, Tammo Freese, Henri Tremblay
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ObjectMethodsFilter(Class<?> toMock, MockInvocationHandler delegate, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MockInvocationHandlergetDelegate()StringgetName()Objectinvoke(Object proxy, Method method, Object[] args)
-
-
-
Constructor Detail
-
ObjectMethodsFilter
public ObjectMethodsFilter(Class<?> toMock, MockInvocationHandler delegate, String name)
-
-
Method Detail
-
getName
public String getName()
-
invoke
public final Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
getDelegate
public MockInvocationHandler getDelegate()
-
-