Enum ResolvedPrimitiveType
- All Implemented Interfaces:
ResolvedType, Serializable, Comparable<ResolvedPrimitiveType>
- Author:
- Federico Tomassetti
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbnp(ResolvedPrimitiveType other) static Optional<ResolvedType> byBoxTypeQName(String qName) static ResolvedTypedescribe()static ResolvedPrimitiveType[]booleanin(ResolvedPrimitiveType... types) booleanisArray()booleanisAssignableBy(ResolvedType other) This method checks if ThisType t = new OtherType() would compile.booleanIs this a boolean type?static booleanisBoxType(ResolvedType type) booleanbooleanIs this a primitive type?booleanCan this be seen as a ReferenceTypeUsage?booleantoString()static ResolvedTypeunp(ResolvedType type) static ResolvedPrimitiveTypeReturns 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.Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface ResolvedType
arrayLevel, asArrayType, asConstraintType, asReferenceType, asTypeParameter, asTypeVariable, asUnionType, asWildcard, erasure, isConstraint, isInferenceVariable, isNull, isNumericType, isReference, isUnionType, isVoid, isWildcard, mention, replaceTypeVariables, replaceTypeVariables, solveGenericTypes
-
Enum Constant Details
-
BYTE
-
SHORT
-
CHAR
-
INT
-
LONG
-
BOOLEAN
-
FLOAT
-
DOUBLE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
byName
-
isBoxType
-
byBoxTypeQName
-
getNumericPrimitiveTypes
-
toString
- Overrides:
toStringin classEnum<ResolvedPrimitiveType>
-
asPrimitive
- Specified by:
asPrimitivein interfaceResolvedType
-
isArray
public boolean isArray()- Specified by:
isArrayin interfaceResolvedType- Returns:
- true, if this type represent an array - otherwise false.
-
isPrimitive
public boolean isPrimitive()Description copied from interface:ResolvedTypeIs this a primitive type?- Specified by:
isPrimitivein interfaceResolvedType
-
isReferenceType
public boolean isReferenceType()Description copied from interface:ResolvedTypeCan this be seen as a ReferenceTypeUsage? In other words: is this a reference to a class, an interface or an enum?- Specified by:
isReferenceTypein interfaceResolvedType
-
describe
- Specified by:
describein interfaceResolvedType
-
isTypeVariable
public boolean isTypeVariable()- Specified by:
isTypeVariablein interfaceResolvedType
-
isAssignableBy
Description copied from interface:ResolvedTypeThis method checks if ThisType t = new OtherType() would compile.- Specified by:
isAssignableByin interfaceResolvedType
-
getBoxTypeQName
-
getBoxTypeClass
-
isNumeric
public boolean isNumeric() -
isBoolean
public boolean isBoolean()Is this a boolean type? -
bnp
-
unp
-
in
-
toDescriptor
- Specified by:
toDescriptorin interfaceResolvedType
-