r01f.reflection.fluent
Class MethodParameterTypes<T>

java.lang.Object
  extended by r01f.reflection.fluent.MethodParameterTypes<T>
Type Parameters:
T - the generic type of the method's return type. Usage example:
   // Equivalent to call 'person.setName("Luke")'
   Reflection.method("setName").withParameterTypes(String.class).in(person).invoke("Luke");
 
   // Equivalent to call 'person.concentrate()'
   Reflection#method(String).method("concentrate").in(person).invoke}();
 
   // Equivalent to call 'person.getName()'
   String name = Reflection.method("getName").withReturnType(String.class).in(person).invoke();
 

public final class MethodParameterTypes<T>
extends java.lang.Object

Encapsulates a method parameter type


Field Summary
private  java.lang.String _methodName
           
private  java.lang.Class<?>[] _parameterTypes
           
 
Constructor Summary
private MethodParameterTypes(java.lang.String methodName, java.lang.Class<?>[] parameterTypes)
           
 
Method Summary
 MethodInvoker<T> in(java.lang.Object target)
          Creates a new method invoker.
(package private) static
<T> MethodParameterTypes<T>
newParameterTypes(java.lang.String methodName, java.lang.Class<?>[] parameterTypes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_methodName

private final java.lang.String _methodName

_parameterTypes

private final java.lang.Class<?>[] _parameterTypes
Constructor Detail

MethodParameterTypes

private MethodParameterTypes(java.lang.String methodName,
                             java.lang.Class<?>[] parameterTypes)
Method Detail

newParameterTypes

static <T> MethodParameterTypes<T> newParameterTypes(java.lang.String methodName,
                                                     java.lang.Class<?>[] parameterTypes)

in

public MethodInvoker<T> in(java.lang.Object target)
Creates a new method invoker.

Parameters:
target - the object containing the method to invoke.
Returns:
the created method invoker.
Throws:
java.lang.NullPointerException - if the given target is null.