org.nakedobjects.metamodel.specloader.internal
Class TypeExtractorMethodParameters

java.lang.Object
  extended by org.nakedobjects.metamodel.specloader.internal.TypeExtractorMethodParameters
All Implemented Interfaces:
java.lang.Iterable<java.lang.Class<?>>

public class TypeExtractorMethodParameters
extends java.lang.Object

Helper that finds all parameter types (including generic types) for the provided Method.

For example,

 public class CustomerRepository {
     public void filterCustomers(List customerList) { ... }
 }
 

will find both List and Customer.


Constructor Summary
TypeExtractorMethodParameters(java.lang.reflect.Method method)
           
 
Method Summary
protected  void add(java.lang.Class<?> cls)
          Adds to list of classes, provided not Void.
protected  void addParameterizedTypes(java.lang.reflect.Type... genericTypes)
           
 java.util.List<java.lang.Class<?>> getClasses()
           
protected  java.lang.reflect.Method getMethod()
          The Method provided in the constructor.
 java.lang.Class<?>[] getParameterTypes()
           
 java.util.Iterator<java.lang.Class<?>> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeExtractorMethodParameters

public TypeExtractorMethodParameters(java.lang.reflect.Method method)
Method Detail

getParameterTypes

public java.lang.Class<?>[] getParameterTypes()

addParameterizedTypes

protected void addParameterizedTypes(java.lang.reflect.Type... genericTypes)

add

protected void add(java.lang.Class<?> cls)
Adds to list of classes, provided not Void.


getMethod

protected java.lang.reflect.Method getMethod()
The Method provided in the constructor.


getClasses

public java.util.List<java.lang.Class<?>> getClasses()

iterator

public java.util.Iterator<java.lang.Class<?>> iterator()
Specified by:
iterator in interface java.lang.Iterable<java.lang.Class<?>>


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.