T
- The return type of the member to be invoked.public class MethodClass<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Callable<T> |
call |
private java.lang.reflect.Method |
method |
Constructor and Description |
---|
MethodClass(java.lang.reflect.Method method) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Callable<T> |
getCallable()
Returns an instance of the generated class.
|
private Callable<T> |
getInstance()
Gets the class to extend the Callable interface.
|
int |
hashCode() |
public MethodClass(java.lang.reflect.Method method)
method
- The method to be dynamically invoked.public Callable<T> getCallable() throws java.lang.InstantiationException
java.lang.InstantiationException
- If there is an error instantiating the class.private Callable<T> getInstance() throws java.lang.InstantiationException
java.lang.InstantiationException
- If there is an error instantiating the class.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object