Top Fields Constructors Methods
com.fasterxml.classmate.types

public final Class ResolvedArrayType

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

Field Summary

Modifier and TypeField and Description
protected final ResolvedType
private static final ResolvedObjectType
PARENT_TYPE

All Java Arrays extend java.lang.Object so we need a reference

Note that direct construction is used instead of construction via TypeResolver due to complexity of doing latter: java.lang.Object also does not implement any interfaces so this should be safe enough.

Inherited from com.fasterxml.classmate.ResolvedType:
_erasedType_typeBindingsNO_CONSTRUCTORSNO_FIELDSNO_METHODSNO_TYPES

Constructor Summary

AccessConstructor and Description
public
ResolvedArrayType(Class<?> erased, TypeBindings bindings, ResolvedType elementType)

Method Summary

Modifier and TypeMethod and Description
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 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 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.
Inherited from com.fasterxml.classmate.ResolvedType:
_appendClassDescription_appendClassName_appendClassSignature_appendErasedClassSignature_getConstructors_getFields_getMethodscanCreateSubtypeequalsfindSupertypegetBriefDescriptiongetConstructorsgetErasedSignaturegetErasedTypegetFullDescriptiongetMemberFieldsgetMemberMethodsgetSignaturegetStaticFieldsgetStaticMethodsgetTypeBindingsgetTypeParametershashCodeisConcreteisInstanceOftoStringtypeParametersFor

Field Detail

_elementTypeback to summary
protected final ResolvedType _elementType
PARENT_TYPEback to summary
private static final ResolvedObjectType PARENT_TYPE

All Java Arrays extend java.lang.Object so we need a reference

Note that direct construction is used instead of construction via TypeResolver due to complexity of doing latter: java.lang.Object also does not implement any interfaces so this should be safe enough.

Since
1.7

Constructor Detail

ResolvedArrayTypeback to summary
public ResolvedArrayType(Class<?> erased, TypeBindings bindings, ResolvedType elementType)

Method Detail

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
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
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