|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jtype.Types
public final class Types
Factory for creating types.
Type| Method Summary | ||
|---|---|---|
static GenericArrayType |
genericArrayType(Type componentType)
Creates a generic array type for the specified component type. |
|
static WildcardType |
lowerBoundedWildcardType(Type lowerBound)
Creates a wildcard type with the specified lower bound. |
|
static ParameterizedType |
parameterizedType(Class<?> rawType,
Type... actualTypeArguments)
Creates a parameterized type for the specified raw type and actual type arguments. |
|
static
|
typeVariable(D declaration,
String name,
Type... bounds)
Creates a type variable for the specified declaration, name and bounds. |
|
static WildcardType |
unboundedWildcardType()
Creates an unbounded wildcard type. |
|
static WildcardType |
upperBoundedWildcardType(Type upperBound)
Creates a wildcard type with the specified upper bound. |
|
static Type |
valueOf(String typeName)
Returns a type that corresponds to the specified string. |
|
static Type |
valueOf(String typeName,
Set<String> imports)
Returns a type that corresponds to the specified string using the specified import context. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <D extends GenericDeclaration> TypeVariable<D> typeVariable(D declaration,
String name,
Type... bounds)
D - the type of generic declaration that declared the type variabledeclaration - the generic declaration that declared the type variablename - the name of the type variablebounds - the upper bounds of the type variable
public static GenericArrayType genericArrayType(Type componentType)
componentType - the component type
public static ParameterizedType parameterizedType(Class<?> rawType,
Type... actualTypeArguments)
rawType - the raw typeactualTypeArguments - the actual type arguments
MalformedParameterizedTypeException - if the number of actual type arguments differs from those defined on the raw typepublic static WildcardType unboundedWildcardType()
public static WildcardType upperBoundedWildcardType(Type upperBound)
upperBound - the upper bound type
public static WildcardType lowerBoundedWildcardType(Type lowerBound)
lowerBound - the lower bound type
public static Type valueOf(String typeName)
typeName - the string to be parsed
public static Type valueOf(String typeName,
Set<String> imports)
typeName - the string to be parsedimports - the fully qualified class names to use when an unqualified class name is encountered
IllegalArgumentException - if the import context contains duplicate entries for an unqualified class name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||