Top Fields Constructors Methods
com.github.javaparser.resolution.types

public final Enum ResolvedPrimitiveType

extends Enum<ResolvedPrimitiveType>
implements ResolvedType
Class Inheritance
All Implemented Interfaces
com.github.javaparser.resolution.types.ResolvedType
Imports
java.util.Arrays, .Collections, .List

Author
Federico Tomassetti

Field Summary

Modifier and TypeField and Description
public static final ResolvedPrimitiveType
private String
public static final ResolvedPrimitiveType
public static final ResolvedPrimitiveType
public static final ResolvedPrimitiveType
public static final ResolvedPrimitiveType
public static final ResolvedPrimitiveType
public static final ResolvedPrimitiveType
private String
private List<ResolvedPrimitiveType>
public static final ResolvedPrimitiveType

Constructor Summary

AccessConstructor and Description
private
ResolvedPrimitiveType(String name, String boxTypeQName, List<ResolvedPrimitiveType> promotionTypes)

Method Summary

Modifier and TypeMethod and Description
public ResolvedPrimitiveType
public static ResolvedType
byName(String name)

public String
public String
public boolean
isArray()

Overrides default com.github.javaparser.resolution.types.ResolvedType.isArray.

Does this type represent an array?
public boolean
isAssignableBy(ResolvedType other)

Implements com.github.javaparser.resolution.types.ResolvedType.isAssignableBy.

This method checks if ThisType t = new OtherType() would compile.
public boolean
public boolean
public boolean
isReferenceType()

Overrides default com.github.javaparser.resolution.types.ResolvedType.isReferenceType.

Can this be seen as a ReferenceTypeUsage?
public boolean
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.
public static ResolvedPrimitiveType
public static ResolvedPrimitiveType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

BOOLEANback to summary
public static final ResolvedPrimitiveType BOOLEAN
boxTypeQNameback to summary
private String boxTypeQName
BYTEback to summary
public static final ResolvedPrimitiveType BYTE
CHARback to summary
public static final ResolvedPrimitiveType CHAR
DOUBLEback to summary
public static final ResolvedPrimitiveType DOUBLE
FLOATback to summary
public static final ResolvedPrimitiveType FLOAT
INTback to summary
public static final ResolvedPrimitiveType INT
LONGback to summary
public static final ResolvedPrimitiveType LONG
nameback to summary
private String name

Hides java.lang.Enum.name.

promotionTypesback to summary
private List<ResolvedPrimitiveType> promotionTypes
SHORTback to summary
public static final ResolvedPrimitiveType SHORT

Constructor Detail

ResolvedPrimitiveTypeback to summary
private ResolvedPrimitiveType(String name, String boxTypeQName, List<ResolvedPrimitiveType> promotionTypes)

Method Detail

asPrimitiveback to summary
public ResolvedPrimitiveType asPrimitive()

Overrides default com.github.javaparser.resolution.types.ResolvedType.asPrimitive.

byNameback to summary
public static ResolvedType byName(String name)
describeback to summary
public String describe()

Implements com.github.javaparser.resolution.types.ResolvedType.describe.

Annotations
@Override
getBoxTypeQNameback to summary
public String getBoxTypeQName()
isArrayback to summary
public boolean isArray()

Overrides default com.github.javaparser.resolution.types.ResolvedType.isArray.

Doc from com.github.javaparser.resolution.types.ResolvedType.isArray.

Does this type represent an array?

Annotations
@Override
isAssignableByback to summary
public boolean isAssignableBy(ResolvedType other)

Implements com.github.javaparser.resolution.types.ResolvedType.isAssignableBy.

Doc from com.github.javaparser.resolution.types.ResolvedType.isAssignableBy.

This method checks if ThisType t = new OtherType() would compile.

Annotations
@Override
isNumericback to summary
public boolean isNumeric()
isPrimitiveback to summary
public boolean isPrimitive()

Overrides default com.github.javaparser.resolution.types.ResolvedType.isPrimitive.

Doc from com.github.javaparser.resolution.types.ResolvedType.isPrimitive.

Is this a primitive type?

Annotations
@Override
isReferenceTypeback to summary
public boolean isReferenceType()

Overrides default com.github.javaparser.resolution.types.ResolvedType.isReferenceType.

Doc from com.github.javaparser.resolution.types.ResolvedType.isReferenceType.

Can this be seen as a ReferenceTypeUsage? In other words: is this a reference to a class, an interface or an enum?

Annotations
@Override
isTypeVariableback to summary
public boolean isTypeVariable()

Overrides default com.github.javaparser.resolution.types.ResolvedType.isTypeVariable.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static ResolvedPrimitiveType valueOf(String name)
valuesback to summary
public static ResolvedPrimitiveType[] values()