Package org.jvnet.tiger_types
Class Lister<T>
java.lang.Object
org.jvnet.tiger_types.Lister<T>
Abstracts away the process of creating a collection (array,
List
, etc)
of items.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Class[]
final Type
final Class
Type of the individual itemprotected final Collection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
static <T> Lister
<T> Creates aLister
instance that produces the given type.static Lister
Creates aLister
instance that produces the given type.abstract T
private static IllegalAccessError
private static InstantiationError
-
Field Details
-
itemType
Type of the individual item -
itemGenericType
-
r
-
CONCRETE_TYPES
-
-
Constructor Details
-
Lister
-
Lister
-
-
Method Details
-
add
-
toCollection
-
create
Creates aLister
instance that produces the given type. -
create
Creates aLister
instance that produces the given type.- Parameters:
c
- The erasure version of 't'. This is taken as a parameter as a performance optimizaiton.- Returns:
- null if the given type doesn't look like a collection.
- Throws:
IllegalArgumentException
- if the given type does look like a collection yet this implementation is not capable of how to handle it.
-
toError
-
toError
-