|
||||||||||
| 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 java.lang.reflect.GenericArrayType |
genericArrayType(java.lang.reflect.Type componentType)
Creates a generic array type for the specified component type. |
|
static java.lang.reflect.WildcardType |
lowerBoundedWildcardType(java.lang.reflect.Type lowerBound)
Creates a wildcard type with the specified lower bound. |
|
static java.lang.reflect.ParameterizedType |
parameterizedType(java.lang.Class<?> rawType,
java.lang.reflect.Type... actualTypeArguments)
Creates a parameterized type for the specified raw type and actual type arguments. |
|
static
|
typeVariable(D declaration,
java.lang.String name,
java.lang.reflect.Type... bounds)
Creates a type variable for the specified declaration, name and bounds. |
|
static java.lang.reflect.WildcardType |
unboundedWildcardType()
Creates an unbounded wildcard type. |
|
static java.lang.reflect.WildcardType |
upperBoundedWildcardType(java.lang.reflect.Type upperBound)
Creates a wildcard type with the specified upper bound. |
|
static java.lang.reflect.Type |
valueOf(java.lang.String typeName)
Returns a type that corresponds to the specified string. |
|
static java.lang.reflect.Type |
valueOf(java.lang.String typeName,
java.util.Set<java.lang.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 java.lang.reflect.GenericDeclaration> java.lang.reflect.TypeVariable<D> typeVariable(D declaration,
java.lang.String name,
java.lang.reflect.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 java.lang.reflect.GenericArrayType genericArrayType(java.lang.reflect.Type componentType)
componentType - the component type
public static java.lang.reflect.ParameterizedType parameterizedType(java.lang.Class<?> rawType,
java.lang.reflect.Type... actualTypeArguments)
rawType - the raw typeactualTypeArguments - the actual type arguments
java.lang.reflect.MalformedParameterizedTypeException - if the number of actual type arguments differs from those defined on the raw typepublic static java.lang.reflect.WildcardType unboundedWildcardType()
public static java.lang.reflect.WildcardType upperBoundedWildcardType(java.lang.reflect.Type upperBound)
upperBound - the upper bound type
public static java.lang.reflect.WildcardType lowerBoundedWildcardType(java.lang.reflect.Type lowerBound)
lowerBound - the lower bound type
public static java.lang.reflect.Type valueOf(java.lang.String typeName)
typeName - the string to be parsed
public static java.lang.reflect.Type valueOf(java.lang.String typeName,
java.util.Set<java.lang.String> imports)
typeName - the string to be parsedimports - the fully qualified class names to use when an unqualified class name is encountered
java.lang.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 | |||||||||