public enum ResolvedPrimitiveType extends Enum<ResolvedPrimitiveType> implements ResolvedType
Enum Constant and Description |
---|
BOOLEAN |
BYTE |
CHAR |
DOUBLE |
FLOAT |
INT |
LONG |
SHORT |
Modifier and Type | Method and Description |
---|---|
ResolvedPrimitiveType |
asPrimitive() |
ResolvedPrimitiveType |
bnp(ResolvedPrimitiveType other) |
static Optional<ResolvedType> |
byBoxTypeQName(String qName) |
static ResolvedType |
byName(String name) |
String |
describe() |
Class |
getBoxTypeClass() |
String |
getBoxTypeQName() |
static ResolvedPrimitiveType[] |
getNumericPrimitiveTypes() |
boolean |
in(ResolvedPrimitiveType... types) |
boolean |
isArray() |
boolean |
isAssignableBy(ResolvedType other)
This method checks if ThisType t = new OtherType() would compile.
|
boolean |
isBoolean()
Is this a boolean type?
|
static boolean |
isBoxType(ResolvedType type) |
boolean |
isNumeric() |
boolean |
isPrimitive()
Is this a primitive type?
|
boolean |
isReferenceType()
Can this be seen as a ReferenceTypeUsage?
|
boolean |
isTypeVariable() |
String |
toDescriptor() |
String |
toString() |
static ResolvedType |
unp(ResolvedType type) |
static ResolvedPrimitiveType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResolvedPrimitiveType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
arrayLevel, asArrayType, asConstraintType, asReferenceType, asTypeParameter, asTypeVariable, asUnionType, asWildcard, erasure, isConstraint, isInferenceVariable, isNull, isNumericType, isReference, isUnionType, isVoid, isWildcard, mention, replaceTypeVariables, replaceTypeVariables, solveGenericTypes
public static final ResolvedPrimitiveType BYTE
public static final ResolvedPrimitiveType SHORT
public static final ResolvedPrimitiveType CHAR
public static final ResolvedPrimitiveType INT
public static final ResolvedPrimitiveType LONG
public static final ResolvedPrimitiveType BOOLEAN
public static final ResolvedPrimitiveType FLOAT
public static final ResolvedPrimitiveType DOUBLE
public static ResolvedPrimitiveType[] values()
for (ResolvedPrimitiveType c : ResolvedPrimitiveType.values()) System.out.println(c);
public static ResolvedPrimitiveType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static ResolvedType byName(String name)
public static boolean isBoxType(ResolvedType type)
public static Optional<ResolvedType> byBoxTypeQName(String qName)
public static ResolvedPrimitiveType[] getNumericPrimitiveTypes()
public String toString()
toString
in class Enum<ResolvedPrimitiveType>
public ResolvedPrimitiveType asPrimitive()
asPrimitive
in interface ResolvedType
public boolean isArray()
isArray
in interface ResolvedType
public boolean isPrimitive()
ResolvedType
isPrimitive
in interface ResolvedType
public boolean isReferenceType()
ResolvedType
isReferenceType
in interface ResolvedType
public String describe()
describe
in interface ResolvedType
public boolean isTypeVariable()
isTypeVariable
in interface ResolvedType
public boolean isAssignableBy(ResolvedType other)
ResolvedType
isAssignableBy
in interface ResolvedType
public String getBoxTypeQName()
public Class getBoxTypeClass()
public boolean isNumeric()
public boolean isBoolean()
public ResolvedPrimitiveType bnp(ResolvedPrimitiveType other)
public static ResolvedType unp(ResolvedType type)
public boolean in(ResolvedPrimitiveType... types)
public String toDescriptor()
toDescriptor
in interface ResolvedType
Copyright © 2007–2023. All rights reserved.