Class ReflectedMethod
java.lang.Object
org.eclipse.nebula.widgets.compositetable.internal.ReflectedMethod
public class ReflectedMethod
extends java.lang.Object
ReflectedMethod. Encapsulates a method that may or may not exist on
some receiver. Invocation policy is that if the method can be invoked,
it is. On failure, returns null.
-
Constructor Summary
Constructors Constructor Description ReflectedMethod(java.lang.Object subject, java.lang.String methodName, java.lang.Class[] paramTypes)
Constructor ReflectedMethod. -
Method Summary
-
Constructor Details
-
ReflectedMethod
public ReflectedMethod(java.lang.Object subject, java.lang.String methodName, java.lang.Class[] paramTypes)Constructor ReflectedMethod. Create a ReflectedMethod object.- Parameters:
subject
- The object on which the method lives.methodName
- The name of the method.paramTypes
- The method's parameter types.
-
-
Method Details
-
exists
public boolean exists()Method exists. Returns true if the underlying method exists, false otherwise.- Returns:
- true if the underlying method exists, false otherwise.
-
invoke
public java.lang.Object invoke(java.lang.Object[] params)Method invoke. If possible, invoke the encapsulated method with the specified parameters.- Parameters:
params
- An Object[] containing the parameters to pass.- Returns:
- any return value or null if there was no return value or an error occured.
-
getType
public java.lang.Class getType()Method getType. Returns the return type of the method.- Returns:
- The return type or null if none.
-