|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.infoway.messagebuilder.j5goodies.Generics
public class Generics
This class provides some utilities for dealing with Generics in the bean definitions of collections.
Constructor Summary | |
---|---|
Generics()
|
Method Summary | |
---|---|
static Type |
getParameterType(PropertyDescriptor descriptor)
Determine the return type of a collection property. |
static Type |
getParameterType(Type type)
Get the type of a particular parameterized type. |
static boolean |
isCollectionParameterizedType(Type type)
This method is used to determine if the type is a Parameterized Type that implements the Collection interface (typically a List or a Set). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Generics()
Method Detail |
---|
public static Type getParameterType(PropertyDescriptor descriptor)
Determine the return type of a collection property. For example, consider the following getter:
public List<String> getNames() { ... }
In this case, the getElementType method will return "String".
descriptor
- - the property descriptor of the generic property
public static Type getParameterType(Type type)
Get the type of a particular parameterized type.
type
- - the generic return type
public static boolean isCollectionParameterizedType(Type type)
This method is used to determine if the type is a Parameterized Type that implements the Collection interface (typically a List or a Set). Note that Maps do not implement the Collection interface.
type
- - the generic return type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |