public final class ResolvedPrimitiveType extends ResolvedType
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.
| Modifier and Type | Field and Description |
|---|---|
protected String |
_description
Human-readable description should be simple as well
|
protected String |
_signature
Primitive types have single-character Signature, easy and efficient
to just store here
|
_erasedType, _typeBindings, NO_CONSTRUCTORS, NO_FIELDS, NO_METHODS, NO_TYPES| Modifier | Constructor and Description |
|---|---|
protected |
ResolvedPrimitiveType(Class<?> erased,
char sig,
String desc) |
| Modifier and Type | Method and Description |
|---|---|
static List<ResolvedPrimitiveType> |
all() |
StringBuilder |
appendBriefDescription(StringBuilder sb) |
StringBuilder |
appendErasedSignature(StringBuilder sb) |
StringBuilder |
appendFullDescription(StringBuilder sb) |
StringBuilder |
appendSignature(StringBuilder sb) |
boolean |
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. |
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.
|
String |
getErasedSignature()
Method that returns type erased signature of the type; suitable
as non-generic signature some packages need
|
String |
getFullDescription()
Human-readable full description of type, which includes specification
of super types (in brief format)
|
List<ResolvedType> |
getImplementedInterfaces()
Returns ordered list of interfaces (in declaration order) that this type
implements.
|
ResolvedType |
getParentClass()
Returns parent class of this type, if it has one; primitive types
and interfaces have no parent class, nor does Object type
Object. |
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>). |
String |
getSignature()
Method that returns full generic signature of the type; suitable
as signature for things like ASM package.
|
boolean |
isAbstract() |
boolean |
isArray()
Method that indicates whether this type is an array type.
|
boolean |
isInterface() |
boolean |
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.
|
static ResolvedPrimitiveType |
voidType() |
_appendClassDescription, _appendClassName, _appendClassSignature, _appendErasedClassSignature, _getConstructors, _getFields, _getMethods, canCreateSubtype, equals, findSupertype, getBriefDescription, getConstructors, getErasedType, getMemberFields, getMemberMethods, getStaticFields, getStaticMethods, getTypeBindings, getTypeParameters, hashCode, isConcrete, isInstanceOf, toString, typeParametersForclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTypeNameprotected final String _signature
protected final String _description
public static List<ResolvedPrimitiveType> all()
public static ResolvedPrimitiveType voidType()
public boolean canCreateSubtypes()
ResolvedTypeTypeResolver.resolveSubtype(ResolvedType, Class)
may ever succeed; if false, it will fail with an exception, if true, it may succeed.canCreateSubtypes in class ResolvedTypepublic ResolvedType getSelfReferencedType()
ResolvedTypeT implements Comparable<T>).
For all other types returns null but for self-references "real" type.
Separate accessor is provided to avoid accidental infinite loops.getSelfReferencedType in class ResolvedTypepublic ResolvedType getParentClass()
ResolvedTypeObject.
Also, placeholders for cyclic (recursive) types return null for
this method.getParentClass in class ResolvedTypepublic boolean isInterface()
isInterface in class ResolvedTypepublic boolean isAbstract()
isAbstract in class ResolvedTypepublic ResolvedType getArrayElementType()
ResolvedTypegetArrayElementType in class ResolvedTypepublic boolean isArray()
ResolvedTypeisArray in class ResolvedTypepublic boolean isPrimitive()
ResolvedTypeisPrimitive in class ResolvedTypepublic List<ResolvedType> getImplementedInterfaces()
ResolvedTypegetImplementedInterfaces in class ResolvedTypepublic String getSignature()
ResolvedTypegetSignature in class ResolvedTypepublic String getErasedSignature()
ResolvedTypegetErasedSignature in class ResolvedTypepublic String getFullDescription()
ResolvedTypegetFullDescription in class ResolvedTypepublic StringBuilder appendSignature(StringBuilder sb)
appendSignature in class ResolvedTypepublic StringBuilder appendErasedSignature(StringBuilder sb)
appendErasedSignature in class ResolvedTypepublic StringBuilder appendFullDescription(StringBuilder sb)
appendFullDescription in class ResolvedTypepublic StringBuilder appendBriefDescription(StringBuilder sb)
appendBriefDescription in class ResolvedTypeCopyright © 2019 fasterxml.com. All rights reserved.