public abstract class FakeObjectMethods extends java.lang.Object implements Invokable
Constructor and Description |
---|
FakeObjectMethods(Invokable next) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
fakeEquals(java.lang.Object invokedObject,
java.lang.Object other) |
protected abstract void |
fakeFinalize(java.lang.Object invokedObject) |
protected abstract int |
fakeHashCode(java.lang.Object invokedObject) |
protected abstract java.lang.String |
fakeToString(java.lang.Object invokedObject) |
java.lang.Object |
invoke(Invocation invocation)
Performs an action in response to an invocation.
|
private boolean |
isMethod(java.lang.reflect.Method method,
java.lang.Class<?> returnType,
java.lang.String name,
java.lang.Class<?>... parameterTypes) |
java.lang.String |
toString() |
private final Invokable next
public FakeObjectMethods(Invokable next)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object invoke(Invocation invocation) throws java.lang.Throwable
Invokable
invoke
in interface Invokable
invocation
- The invocation to perform.null
if the invoked method has a void return type.java.lang.Throwable
- An exception to be thrown to the caller, if not returning a value. Any checked exception
thrown must be in the throws
list of the invoked method.protected abstract int fakeHashCode(java.lang.Object invokedObject)
protected abstract java.lang.String fakeToString(java.lang.Object invokedObject)
protected abstract boolean fakeEquals(java.lang.Object invokedObject, java.lang.Object other)
protected abstract void fakeFinalize(java.lang.Object invokedObject)
private boolean isMethod(java.lang.reflect.Method method, java.lang.Class<?> returnType, java.lang.String name, java.lang.Class<?>... parameterTypes)