org.nakedobjects.metamodel.specloader.internal
Class TypeExtractorMethodReturn

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

public class TypeExtractorMethodReturn
extends java.lang.Object
implements java.lang.Iterable<java.lang.Class<?>>

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

For example,

 public class CustomerRepository {
     public List<Customer> findCustomers( ... ) { ... }
 }
 

will find both List and Customer.


Constructor Summary
TypeExtractorMethodReturn(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.util.Iterator<java.lang.Class<?>> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Iterable
iterator
 

Constructor Detail

TypeExtractorMethodReturn

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

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.