r01f.reflection.fluent
Class StaticMethodReturnTypes.StaticMethodReturnTypeGenerics<T>

java.lang.Object
  extended by r01f.reflection.fluent.StaticMethodReturnTypes.StaticMethodReturnTypeGenerics<T>
Type Parameters:
T - the generic type of the static method's return type. Usage example:
   // Equivalent to call 'Jedi.getCommonPowers()'
   List powers = Reflection.staticMethod("getCommonPowers").withReturnType(new TypeRef>() {}).in(Jedi.class).invoke}();
 
Enclosing class:
StaticMethodReturnTypes

public static class StaticMethodReturnTypes.StaticMethodReturnTypeGenerics<T>
extends java.lang.Object

Return type of the static method to invoke.


Field Summary
private  java.lang.String _methodName
           
 
Constructor Summary
StaticMethodReturnTypes.StaticMethodReturnTypeGenerics(java.lang.String methodName)
           
 
Method Summary
 MethodInvoker<T> in(java.lang.Class<?> target)
          Creates a new method invoker.
 StaticMethodParameterTypes<T> withParameterTypes(java.lang.Class<?>... parameterTypes)
          Specifies the parameter types of the static method to invoke.
 
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
Constructor Detail

StaticMethodReturnTypes.StaticMethodReturnTypeGenerics

StaticMethodReturnTypes.StaticMethodReturnTypeGenerics(java.lang.String methodName)
Method Detail

in

public MethodInvoker<T> in(java.lang.Class<?> 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.

withParameterTypes

public StaticMethodParameterTypes<T> withParameterTypes(java.lang.Class<?>... parameterTypes)
Specifies the parameter types of the static method to invoke. This method call is optional if the method to invoke does not take arguments.

Parameters:
parameterTypes - the parameter types of the method to invoke.
Returns:
the created parameter types holder.
Throws:
java.lang.NullPointerException - if the array of parameter types is null.