public class MethodWrapper
extends java.lang.Object
Method class for easy access to all required methods.| Constructor and Description |
|---|
MethodWrapper(MethodStream parent,
java.lang.reflect.Method method) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
invoke()
Invoke the method without any arguments.
|
<T> T |
invokeArgs(java.lang.Object... args)
Invoke the method with the given arguments.
|
<T> T |
invokeInstance(java.lang.Object instance,
java.lang.Object... args)
Invoke the method of the given instance with the given arguments.
|
ModifierWrapper |
modifier() |
java.lang.String |
name() |
java.lang.Class<?> |
owner() |
java.lang.Class<?>[] |
parameterTypes() |
MethodStream |
parent() |
java.lang.reflect.Method |
raw() |
java.lang.Class<?> |
returnType() |
public MethodWrapper(MethodStream parent, java.lang.reflect.Method method)
public MethodStream parent()
public java.lang.reflect.Method raw()
public java.lang.String name()
public java.lang.Class<?> returnType()
public java.lang.Class<?>[] parameterTypes()
public java.lang.Class<?> owner()
public ModifierWrapper modifier()
ModifierWrapper of the methodpublic <T> T invoke()
T - The type of the resultjava.lang.IllegalStateException - If the method is not static and no instance is cachedpublic <T> T invokeArgs(java.lang.Object... args)
T - The type of the resultargs - The arguments to pass to the methodjava.lang.IllegalStateException - If the method is not static and no instance is cachedpublic <T> T invokeInstance(java.lang.Object instance,
java.lang.Object... args)
T - The type of the resultinstance - The instance to invoke the method onargs - The arguments to pass to the method