public final class TypesUtils extends @NonNull Object
TypeMirror
s.Modifier and Type | Method and Description |
---|---|
static @Nullable Name |
getQualifiedName(DeclaredType type)
Gets the fully qualified name for a provided type.
|
static boolean |
isAnonymousType(TypeMirror type)
Checks if the type represents an anonymous type, e.g.
|
static boolean |
isBoxedPrimitive(TypeMirror type) |
static boolean |
isClass(TypeMirror type)
Checks if the type represents a java.lang.Class declared type.
|
static boolean |
isDeclaredOfName(TypeMirror type,
CharSequence qualifiedName)
Check if the type represent a declared type of the given qualified name
|
static boolean |
isObject(TypeMirror type)
Checks if the type represents a java.lang.Object declared type.
|
static boolean |
isString(TypeMirror type)
Checks if the type represents a java.lang.String declared type.
|
static boolean |
isThrowable(TypeMirror type) |
public static @Nullable Name getQualifiedName(DeclaredType type)
type
- the declared typepublic static boolean isObject(TypeMirror type)
type
- the typepublic static boolean isClass(TypeMirror type)
type
- the typepublic static boolean isString(TypeMirror type)
type
- the typepublic static boolean isDeclaredOfName(TypeMirror type, CharSequence qualifiedName)
type
- the typepublic static boolean isAnonymousType(TypeMirror type)
type
- the declared typepublic static boolean isBoxedPrimitive(TypeMirror type)
public static boolean isThrowable(TypeMirror type)