org.directwebremoting.extend
Interface TypeInfo

All Known Implementing Classes:
DefaultTypeInfo, ReflectionTypeInfo, SimpleTypeInfo

public interface TypeInfo

Neither Class nor Type really do it for passing generic type information around. Type isn't guaranteed to work, and Class can't tell you any thing about the types. TypeInfo allows us to annotate the type information when we know more than the JVM.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Method Summary
 TypeInfo getChildTypeInfo(int i)
          Any type can have a number of generic type parameters.
 java.lang.Class<?> getPrimaryType()
          The We'd like to just pass around a Class, but that doesn't hold generic information, so this gets us the basic level of data.
 

Method Detail

getPrimaryType

java.lang.Class<?> getPrimaryType()
The We'd like to just pass around a Class, but that doesn't hold generic information, so this gets us the basic level of data.


getChildTypeInfo

TypeInfo getChildTypeInfo(int i)
Any type can have a number of generic type parameters. This method gets access to the child TypeInfo objects, from which you can call getPrimaryType(). This array is zero based.

Parameters:
i - The index of the generic type parameter.
Returns:
A child TypeInfo object
Throws:
java.lang.IllegalArgumentException - if i<0 or i>=childCount

Copyright ยจ 2008