Top Description Fields Constructors Methods
com.fasterxml.classmate.types

public final Class ResolvedPrimitiveType

extends ResolvedType
Class Inheritance
Imports
java.util.*, com.fasterxml.classmate.ResolvedType, .TypeBindings

Type used for Java primitive types (which does not include arrays here).

Since set of primitive types is bounded, constructor is defined as protected, and class final; that is, new primitive types are not to be constructed by calling applications.

Field Summary

Modifier and TypeField and Description
protected final String
_description

Human-readable description should be simple as well

protected final String
_signature

Primitive types have single-character Signature, easy and efficient to just store here

private static final ResolvedPrimitiveType
Inherited from com.fasterxml.classmate.ResolvedType:
_erasedType_typeBindingsNO_CONSTRUCTORSNO_FIELDSNO_METHODSNO_TYPES

Constructor Summary

AccessConstructor and Description
protected
ResolvedPrimitiveType(Class<?> erased, char sig, String desc)

Method Summary

Modifier and TypeMethod and Description
public static List<ResolvedPrimitiveType>
all()

public StringBuilder
public StringBuilder
public StringBuilder
public StringBuilder
public boolean
canCreateSubtypes()

Implements abstract com.fasterxml.classmate.ResolvedType.canCreateSubtypes.

Method that can be used to check if call to TypeResolver#resolveSubtype(ResolvedType, Class) may ever succeed; if false, it will fail with an exception, if true, it may succeed.
public ResolvedType
getArrayElementType()

Implements abstract com.fasterxml.classmate.ResolvedType.getArrayElementType.

Method that can be used to access element type of array types; will return null for non-array types, and non-null type for array types.
public String
getErasedSignature()

Overrides com.fasterxml.classmate.ResolvedType.getErasedSignature.

Method that returns type erased signature of the type; suitable as non-generic signature some packages need
public String
getFullDescription()

Overrides com.fasterxml.classmate.ResolvedType.getFullDescription.

Human-readable full description of type, which includes specification of super types (in brief format)
public List<ResolvedType>
getImplementedInterfaces()

Implements abstract com.fasterxml.classmate.ResolvedType.getImplementedInterfaces.

Returns ordered list of interfaces (in declaration order) that this type directly implements.
public ResolvedType
getParentClass()

Implements abstract com.fasterxml.classmate.ResolvedType.getParentClass.

Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object type java.lang.Object.
public ResolvedType
getSelfReferencedType()

Implements abstract com.fasterxml.classmate.ResolvedType.getSelfReferencedType.

Accessor that must be used to find out actual type in case of "self-reference"; case where type refers recursive to itself (like, T implements Comparable<T>).
public String
getSignature()

Overrides com.fasterxml.classmate.ResolvedType.getSignature.

Method that returns full generic signature of the type; suitable as signature for things like ASM package.
public boolean
public boolean
isArray()

Implements abstract com.fasterxml.classmate.ResolvedType.isArray.

Method that indicates whether this type is an array type.
public boolean
public boolean
isPrimitive()

Implements abstract com.fasterxml.classmate.ResolvedType.isPrimitive.

Method that indicates whether this type is one of small number of primitive Java types; not including array types of primitive types but just basic primitive types.
public static ResolvedPrimitiveType
Inherited from com.fasterxml.classmate.ResolvedType:
_appendClassDescription_appendClassName_appendClassSignature_appendErasedClassSignature_getConstructors_getFields_getMethodscanCreateSubtypeequalsfindSupertypegetBriefDescriptiongetConstructorsgetErasedTypegetMemberFieldsgetMemberMethodsgetStaticFieldsgetStaticMethodsgetTypeBindingsgetTypeParametershashCodeisConcreteisInstanceOftoStringtypeParametersFor

Field Detail

_descriptionback to summary
protected final String _description

Human-readable description should be simple as well

_signatureback to summary
protected final String _signature

Primitive types have single-character Signature, easy and efficient to just store here

VOIDback to summary
private static final ResolvedPrimitiveType VOID

Constructor Detail

ResolvedPrimitiveTypeback to summary
protected ResolvedPrimitiveType(Class<?> erased, char sig, String desc)

Method Detail

allback to summary
public static List<ResolvedPrimitiveType> all()
appendBriefDescriptionback to summary
public StringBuilder appendBriefDescription(StringBuilder sb)

Implements abstract com.fasterxml.classmate.ResolvedType.appendBriefDescription.

Annotations
@Override
appendErasedSignatureback to summary
public StringBuilder appendErasedSignature(StringBuilder sb)

Implements abstract com.fasterxml.classmate.ResolvedType.appendErasedSignature.

Annotations
@Override
appendFullDescriptionback to summary
public StringBuilder appendFullDescription(StringBuilder sb)

Implements abstract com.fasterxml.classmate.ResolvedType.appendFullDescription.

Annotations
@Override
appendSignatureback to summary
public StringBuilder appendSignature(StringBuilder sb)

Implements abstract com.fasterxml.classmate.ResolvedType.appendSignature.

Annotations
@Override
canCreateSubtypesback to summary
public boolean canCreateSubtypes()

Implements abstract com.fasterxml.classmate.ResolvedType.canCreateSubtypes.

Doc from com.fasterxml.classmate.ResolvedType.canCreateSubtypes.

Method that can be used to check if call to TypeResolver#resolveSubtype(ResolvedType, Class) may ever succeed; if false, it will fail with an exception, if true, it may succeed.

Annotations
@Override
getArrayElementTypeback to summary
public ResolvedType getArrayElementType()

Implements abstract com.fasterxml.classmate.ResolvedType.getArrayElementType.

Doc from com.fasterxml.classmate.ResolvedType.getArrayElementType.

Method that can be used to access element type of array types; will return null for non-array types, and non-null type for array types.

Annotations
@Override
getErasedSignatureback to summary
public String getErasedSignature()

Overrides com.fasterxml.classmate.ResolvedType.getErasedSignature.

Doc from com.fasterxml.classmate.ResolvedType.getErasedSignature.

Method that returns type erased signature of the type; suitable as non-generic signature some packages need

Annotations
@Override
getFullDescriptionback to summary
public String getFullDescription()

Overrides com.fasterxml.classmate.ResolvedType.getFullDescription.

Doc from com.fasterxml.classmate.ResolvedType.getFullDescription.

Human-readable full description of type, which includes specification of super types (in brief format)

Annotations
@Override
getImplementedInterfacesback to summary
public List<ResolvedType> getImplementedInterfaces()

Implements abstract com.fasterxml.classmate.ResolvedType.getImplementedInterfaces.

Doc from com.fasterxml.classmate.ResolvedType.getImplementedInterfaces.

Returns ordered list of interfaces (in declaration order) that this type directly implements.

Note

returned list does NOT include transitively implemented types (that is, interfaces implemented by parent classes or interfaces).

Returns:List<ResolvedType>

List of interfaces this type implements, if any; empty list if none (never null).

Annotations
@Override
getParentClassback to summary
public ResolvedType getParentClass()

Implements abstract com.fasterxml.classmate.ResolvedType.getParentClass.

Doc from com.fasterxml.classmate.ResolvedType.getParentClass.

Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object type java.lang.Object. Also, placeholders for cyclic (recursive) types return null for this method.

Annotations
@Override
getSelfReferencedTypeback to summary
public ResolvedType getSelfReferencedType()

Implements abstract com.fasterxml.classmate.ResolvedType.getSelfReferencedType.

Doc from com.fasterxml.classmate.ResolvedType.getSelfReferencedType.

Accessor that must be used to find out actual type in case of "self-reference"; case where type refers recursive to itself (like, T implements Comparable<T>). For all other types returns null but for self-references "real" type. Separate accessor is provided to avoid accidental infinite loops.

Annotations
@Override
getSignatureback to summary
public String getSignature()

Overrides com.fasterxml.classmate.ResolvedType.getSignature.

Doc from com.fasterxml.classmate.ResolvedType.getSignature.

Method that returns full generic signature of the type; suitable as signature for things like ASM package.

Annotations
@Override
isAbstractback to summary
public boolean isAbstract()

Implements abstract com.fasterxml.classmate.ResolvedType.isAbstract.

Annotations
@Override
isArrayback to summary
public boolean isArray()

Implements abstract com.fasterxml.classmate.ResolvedType.isArray.

Doc from com.fasterxml.classmate.ResolvedType.isArray.

Method that indicates whether this type is an array type.

Annotations
@Override
isInterfaceback to summary
public boolean isInterface()

Implements abstract com.fasterxml.classmate.ResolvedType.isInterface.

Annotations
@Override
isPrimitiveback to summary
public boolean isPrimitive()

Implements abstract com.fasterxml.classmate.ResolvedType.isPrimitive.

Doc from com.fasterxml.classmate.ResolvedType.isPrimitive.

Method that indicates whether this type is one of small number of primitive Java types; not including array types of primitive types but just basic primitive types.

Annotations
@Override
voidTypeback to summary
public static ResolvedPrimitiveType voidType()