Class TypePlaceHolder
java.lang.Object
com.fasterxml.classmate.ResolvedType
com.fasterxml.classmate.types.TypePlaceHolder
- All Implemented Interfaces:
Type
Placeholder used for resolving type assignments to figure out
type parameters for subtypes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ResolvedTypeType assigned during wildcard resolution (which follows type structure resolution)protected final intFields inherited from class ResolvedType
_erasedType, _typeBindings, NO_CONSTRUCTORS, NO_FIELDS, NO_METHODS, NO_TYPES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanMethod that can be used to check if call toTypeResolver.resolveSubtype(ResolvedType, Class)may ever succeed; if false, it will fail with an exception, if true, it may succeed.booleanMethod 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.Returns ordered list of interfaces (in declaration order) that this type implements.Returns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object typeObject.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>).booleanbooleanisArray()Method that indicates whether this type is an array type.booleanbooleanMethod 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.Methods inherited from class ResolvedType
_appendClassDescription, _appendClassName, _appendClassSignature, _appendErasedClassSignature, _getConstructors, _getFields, _getMethods, canCreateSubtype, findSupertype, getBriefDescription, getConstructors, getErasedSignature, getErasedType, getFullDescription, getMemberFields, getMemberMethods, getSignature, getStaticFields, getStaticMethods, getTypeBindings, getTypeParameters, hashCode, isConcrete, isInstanceOf, toString, typeParametersForMethods inherited from interface Type
getTypeName
-
Field Details
-
_ordinal
protected final int _ordinal -
_actualType
Type assigned during wildcard resolution (which follows type structure resolution)
-
-
Constructor Details
-
TypePlaceHolder
public TypePlaceHolder(int ordinal)
-
-
Method Details
-
canCreateSubtypes
public boolean canCreateSubtypes()Description copied from class:ResolvedTypeMethod that can be used to check if call toTypeResolver.resolveSubtype(ResolvedType, Class)may ever succeed; if false, it will fail with an exception, if true, it may succeed.- Specified by:
canCreateSubtypesin classResolvedType
-
actualType
-
actualType
-
getParentClass
Description copied from class:ResolvedTypeReturns parent class of this type, if it has one; primitive types and interfaces have no parent class, nor does Object typeObject. Also, placeholders for cyclic (recursive) types return null for this method.- Specified by:
getParentClassin classResolvedType
-
getSelfReferencedType
Description copied from class:ResolvedTypeAccessor 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.- Specified by:
getSelfReferencedTypein classResolvedType
-
getImplementedInterfaces
Description copied from class:ResolvedTypeReturns ordered list of interfaces (in declaration order) that this type implements.- Specified by:
getImplementedInterfacesin classResolvedType- Returns:
- List of interfaces this type implements, if any; empty list if none
-
getArrayElementType
Description copied from class:ResolvedTypeMethod 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.- Specified by:
getArrayElementTypein classResolvedType
-
isInterface
public boolean isInterface()- Specified by:
isInterfacein classResolvedType
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstractin classResolvedType
-
isArray
public boolean isArray()Description copied from class:ResolvedTypeMethod that indicates whether this type is an array type.- Specified by:
isArrayin classResolvedType
-
isPrimitive
public boolean isPrimitive()Description copied from class:ResolvedTypeMethod 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.- Specified by:
isPrimitivein classResolvedType
-
appendSignature
- Specified by:
appendSignaturein classResolvedType
-
appendErasedSignature
- Specified by:
appendErasedSignaturein classResolvedType
-
appendBriefDescription
- Specified by:
appendBriefDescriptionin classResolvedType
-
appendFullDescription
- Specified by:
appendFullDescriptionin classResolvedType
-
equals
- Overrides:
equalsin classResolvedType
-