| Modifier and Type | Class and Description |
|---|---|
| private static class | TypeUtils.
GenericArrayType implementation class. |
| private static class | TypeUtils.
ParameterizedType implementation class. |
| public static class | |
| private static class | TypeUtils.
WildcardType implementation class. |
| Modifier and Type | Field and Description |
|---|---|
| private static final AppendableJoiner | AMP_JOINER
Ampersand sign joiner. |
| private static final AppendableJoiner | CTJ_JOINER
Method classToString joiner. |
| private static final AppendableJoiner | GT_JOINER
Greater than and lesser than sign joiner. |
| public static final WildcardType | WILDCARD_ALL
A wildcard instance matching |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static <T> String | |
| private static void | appendRecursiveTypes(final StringBuilder builder, final int[] recursiveTypeIndexes, final Type[] argumentTypes)
|
| private static <T> String | |
| public static boolean | Returns: boolean.the type to check for type variables. type)Tests, recursively, whether any of the type parameters associated with |
| private static boolean | containsVariableTypeSameParametrizedTypeBound(final TypeVariable<?> typeVariable, final ParameterizedType parameterizedType)
|
| public static Map | Returns: aMap of the type assignments that could be determined for the type variables in each type in the inheritance hierarchy from type
to toClass inclusive.the class whose type parameters are to be determined, not cls, final ParameterizedType null.the super type from which superParameterizedType)cls's type arguments are to be determined, not null.Tries to determine the type arguments of a class/interface based on a super parameterized type's type arguments. |
| private static boolean | Returns: boolean.LHS. genericArrayType, final Type RHS. type)Tests whether |
| private static boolean | Returns: boolean.LHS. parameterizedType, final Type RHS. type)Tests whether |
| public static boolean | |
| private static boolean | |
| private static boolean | Returns: boolean.LHS. wildcardType, final Type RHS. type)Tests whether |
| private static Type[] | Returns: array of map values corresponding to specified keys.map containing the assignments. mappings, final TypeVariable<?>[] expected map keys. variables)Helper method to establish the formal parameters for a parameterized type. |
| private static int[] | |
| public static GenericArrayType | Returns: GenericArrayType.the type of the elements of the array. For example the component type of componentType)boolean[] is boolean.Creates a generic array type instance. |
| private static String | Returns: String.GenericArrayType to format.Formats a |
| public static Type | Returns: component type or null if type is not an array type.the type to be checked. type)Gets the array component type of |
| private static Type | Returns: the closes parent type.the class in question. cls, final Class<?> the super class. superClass)Gets the closest parent type to the super class specified by |
| public static Type[] | Returns: a non-empty array containing the bounds of the type variable, which could beObject.the subject type variable, not typeVariable)null.Gets an array containing the sole type of |
| public static Type[] | Returns: a non-empty array containing the lower bounds of the wildcard type, which could be null.the subject wildcard type, not wildcardType)null.Gets an array containing a single value of |
| public static Type[] | Returns: a non-empty array containing the upper bounds of the wildcard type.the subject wildcard type, not wildcardType)null.Gets an array containing the sole value of |
| private static Class | Returns: the correspondingClass object.the type to be converted. parameterizedType)Transforms the passed in type to a |
| public static Class | getRawType(final Type
to resolve. type, final Type type to be resolved against. assigningType)Gets the raw type of a Java type, given its context. |
| private static Map | Returns: theMap with type arguments.the class in question. cls, final Class<?> the context class. toClass, final Map<TypeVariable<?>, Type> a map with type variables. subtypeVarAssigns)Gets a map of the type arguments of a class in the context of |
| public static Map | Returns: aMap of the type arguments to their respective type variables.specifies the subject parameterized type from which to harvest the parameters. type)Gets all the type arguments for this parameterized type including owner hierarchy arguments such as |
| private static Map | Returns: theMap with type arguments.the parameterized type. parameterizedType, final Class<?> the class. toClass, final Map<TypeVariable<?>, Type> a map with type variables. subtypeVarAssigns)Gets a map of the type arguments of a parameterized type in the context of |
| public static Map | Returns: aMap of the type assignments for the type variables in each type in the inheritance hierarchy from type to toClass
inclusive.the type from which to determine the type parameters of type, final Class<?> toClassthe class whose type parameters are to be determined based on the subtype toClass)typeGets the type arguments of a class/interface based on a subtype. |
| private static Map | Returns: theMap with type arguments.the type in question. type, final Class<?> the class. toClass, final Map<TypeVariable<?>, Type> a map with type variables. subtypeVarAssigns)Gets a map of the type arguments of |
| public static boolean | isArrayType(final Type
the type to be checked. type)Tests whether the specified type denotes an array type. |
| private static boolean | Returns: true if type is assignable to toClass.the subject type to be assigned to the target type. type, final Class<?> the target class. toClass)Tests if the subject type may be implicitly cast to the target class following the Java generics rules. |
| private static boolean | Returns: true if type is assignable to toGenericArrayType.the subject type to be assigned to the target type. type, final GenericArrayType the target generic array type. toGenericArrayType, final Map<TypeVariable<?>, Type> a map with type variables. typeVarAssigns)Tests if the subject type may be implicitly cast to the target generic array type following the Java generics rules. |
| private static boolean | Returns: true if type is assignable to toType.the subject type to be assigned to the target type. type, final ParameterizedType the target parameterized type. toParameterizedType, final Map<TypeVariable<?>, Type> a map with type variables. typeVarAssigns)Tests if the subject type may be implicitly cast to the target parameterized type following the Java generics rules. |
| public static boolean | Returns: true if type is assignable to toType.the subject type to be assigned to the target type. type, final Type the target type. toType)Tests if the subject type may be implicitly cast to the target type following the Java generics rules. |
| private static boolean | Returns: true if type is assignable to toType.the subject type to be assigned to the target type. type, final Type the target type. toType, final Map<TypeVariable<?>, Type> optional map of type variable assignments. typeVarAssigns)Tests if the subject type may be implicitly cast to the target type following the Java generics rules. |
| private static boolean | Returns: true if type is assignable to toTypeVariable.the subject type to be assigned to the target type. type, final TypeVariable<?> the target type variable. toTypeVariable, final Map<TypeVariable<?>, Type> a map with type variables. typeVarAssigns)Tests if the subject type may be implicitly cast to the target type variable following the Java generics rules. |
| private static boolean | Returns: true if type is assignable to toWildcardType.the subject type to be assigned to the target type. type, final WildcardType the target wildcard type. toWildcardType, final Map<TypeVariable<?>, Type> a map with type variables. typeVarAssigns)Tests if the subject type may be implicitly cast to the target wildcard type following the Java generics rules. |
| private static boolean | Returns: whether the class contains a cyclical reference.the class to test. cls)Tests whether the class contains a cyclical reference in the qualified name of a class. |
| public static boolean | Returns: true if value is an instance of type.the value to be checked. value, final Type the target type. type)Tests if the given value can be assigned to the target type following the Java generics rules. |
| private static < the generic type of the class in question. T> void | mapTypeVariablesToArguments(final Class<T>
the class in question. cls, final ParameterizedType the parameterized type. parameterizedType, final Map<TypeVariable<?>, Type> the map to be filled. typeVarAssigns)Maps type variables. |
| public static Type[] | Returns: an array containing the values frombounds minus the redundant types.Strips out the redundant upper bound types in type variable types and wildcard types (or it would with wildcard types if multiple upper bounds were allowed). |
| private static Type[] | Returns: result fromnormalizeUpperBounds(Type[]) unless bounds is empty in which case return an array with the element
Object.class.bounds an array of types representing the upper bounds of either bounds)WildcardType or TypeVariable, not null.Delegates to |
| public static final ParameterizedType | Returns: ParameterizedType.the raw class to create a parameterized type instance for. rawClass, final Map<TypeVariable<?>, Type> the map used for parameterization. typeVariableMap)Creates a parameterized type instance. |
| public static final ParameterizedType | Returns: ParameterizedType.the raw class to create a parameterized type instance for. rawClass, final Type... the types used for parameterization. typeArguments)Creates a parameterized type instance. |
| private static String | Returns: String.ParameterizedType to format.Formats a |
| public static final ParameterizedType | Returns: ParameterizedType.the owning type. owner, final Class<?> the raw class to create a parameterized type instance for. rawClass, final Map<TypeVariable<?>, Type> the map used for parameterization. typeVariableMap)Creates a parameterized type instance. |
| public static final ParameterizedType | Returns: ParameterizedType.the owning type. owner, final Class<?> the raw class to create a parameterized type instance for. rawClass, final Type... the types used for parameterization. typeArguments)Creates a parameterized type instance. |
| private static Type | Returns: the replaced type.the type to be replaced. type, final Map<TypeVariable<?>, Type> the map with type variables. typeVarAssigns)Finds the mapping for |
| public static String | Returns: String.the type variable to create a String representation for, not typeVariable)null.Formats a |
| public static String | |
| public static boolean | Returns: whether or not the types can be assigned to their respective type variables.specifies the potential types to be assigned to the type variables, not typeVariableMap)null.Determines whether or not specified types satisfy the bounds of their mapped type variables. |
| private static String | Returns: String.TypeVariable to format.Formats a |
| private static Type[] | Returns: bounds with any variables reassigned.assignments typeArguments, final Type[] Map.in which to expand variables. bounds)Unrolls variables in a type bounds array. |
| private static Type | Returns: Type ornull if some variable was not in the map.the type variable to look up. typeVariable, final Map<TypeVariable<?>, Type> the map used for the look-up. typeVarAssigns)Looks up |
| public static Type | Returns: Type.the type to unroll variable assignments for. type)Gets a type representing |
| public static TypeUtils. | |
| private static String | Returns: String.WildcardType to format.Formats a |
| public static < generic type. T> Typed | |
| public static < inferred generic type. T> Typed |