T - public final class Type<T> extends Object implements ParameterizedType, Comparable<Type<?>>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Type<?> other) |
boolean |
equals(Object obj) |
Type<?> |
findAncestor(Class<?> ancestor)
Finds a class or interface which is an ancestor of this type
|
Type<?> |
findInterface(Type<?> theInterface) |
Type[] |
getActualTypeArguments() |
String |
getCanonicalName() |
Type<?> |
getComponentType() |
Type<?>[] |
getInterfaces() |
String |
getName() |
<X> Type<X> |
getNestedType(int index)
Get the nested Type of the specified index.
|
Type |
getOwnerType() |
Type<?> |
getPrimitiveType() |
Class<T> |
getRawType() |
String |
getSimpleName() |
Type<?> |
getSuperType() |
Type |
getTypeByVariable(TypeVariable<?> typeVariable) |
int |
getUniqueIndex() |
Type<?> |
getWrapperType() |
int |
hashCode() |
boolean |
isArray() |
boolean |
isAssignableFrom(Class<?> other)
Test whether this type is assignable from the other Class; returns true
if this type is not parameterized and the raw type is assignable.
|
boolean |
isAssignableFrom(Type<?> other)
Test whether this type is assignable from the other type.
|
boolean |
isCollection() |
boolean |
isConcrete() |
boolean |
isConvertibleFromString()
Verifies whether the Type has a static valueOf method available for
converting a String into an instance of the type.
Note that this method will also return true for primitive types whose corresponding wrapper types have a static valueOf method. |
boolean |
isEnum() |
boolean |
isImmutable() |
boolean |
isList() |
boolean |
isMap() |
boolean |
isMultiOccurrence() |
boolean |
isParameterized() |
boolean |
isPrimitive() |
boolean |
isPrimitiveFor(Type<?> wrapper) |
boolean |
isPrimitiveWrapper() |
boolean |
isSelfOrAncestorParameterized() |
boolean |
isString() |
boolean |
isWrapperFor(Type<?> primitive) |
String |
toFullyQualifiedString() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTypeNamepublic boolean isParameterized()
public boolean isSelfOrAncestorParameterized()
public int getUniqueIndex()
public <X> Type<X> getNestedType(int index)
index - public Type<?> getSuperType()
public Type<?>[] getInterfaces()
public Type[] getActualTypeArguments()
getActualTypeArguments in interface ParameterizedTypepublic Type getTypeByVariable(TypeVariable<?> typeVariable)
public Class<T> getRawType()
getRawType in interface ParameterizedTypepublic Type<?> getComponentType()
public Type getOwnerType()
getOwnerType in interface ParameterizedTypepublic String getSimpleName()
public String getName()
public String getCanonicalName()
public boolean isAssignableFrom(Type<?> other)
other - public boolean isAssignableFrom(Class<?> other)
other - public boolean isEnum()
public boolean isArray()
public boolean isCollection()
public boolean isList()
public boolean isMap()
public boolean isMultiOccurrence()
public boolean isString()
public boolean isPrimitive()
public boolean isPrimitiveWrapper()
public boolean isWrapperFor(Type<?> primitive)
public boolean isPrimitiveFor(Type<?> wrapper)
public boolean isImmutable()
public boolean isConcrete()
public Type<?> getWrapperType()
public Type<?> findAncestor(Class<?> ancestor)
ancestor - public Type<?> getPrimitiveType()
public boolean isConvertibleFromString()
public String toFullyQualifiedString()
public int compareTo(Type<?> other)
compareTo in interface Comparable<Type<?>>Copyright © 2019 Glasnost. All rights reserved.