Package | Description |
---|---|
com.fasterxml.classmate |
Package that contains main public interface of ClassMate
package.
|
com.fasterxml.classmate.members |
Package that contains implementations of various member types
(methods, fields, constructors)
|
com.fasterxml.classmate.types |
Package that contains
com.fastexml.classmate.ResolvedType
implementation classes. |
com.fasterxml.classmate.util |
Various utility classes used by ClassMate.
|
Modifier and Type | Field and Description |
---|---|
protected static ResolvedType[] |
ResolvedType.NO_TYPES |
Modifier and Type | Field and Description |
---|---|
protected static HashMap<ClassKey,ResolvedType> |
TypeResolver._primitiveTypes
Since number of primitive types is small, and they are frequently needed,
let's actually pre-create them for efficient reuse.
|
Modifier and Type | Method and Description |
---|---|
ResolvedType |
TypeBindings.findBoundType(String name)
Find type bound to specified name, if there is one; returns bound type if so, null if not.
|
ResolvedType |
ResolvedType.findSupertype(Class<?> erasedSupertype)
Method for finding super type of this type that has specified type
erased signature.
|
abstract ResolvedType |
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.
|
ResolvedType |
TypeBindings.getBoundType(int index) |
abstract ResolvedType |
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 . |
abstract ResolvedType |
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> ). |
ResolvedType |
TypeResolver.resolve(Class<?> rawType)
Factory method for resolving a type-erased class; in this case any
generic type information has to come from super-types (via inheritance).
|
ResolvedType |
TypeResolver.resolve(Class<?> type,
Class<?>... typeParameters)
Factory method for resolving given type (specified by type-erased class),
using specified types as type parameters.
|
ResolvedType |
TypeResolver.resolve(Class<?> type,
ResolvedType... typeParameters)
Factory method for resolving given type (specified by type-erased class),
using specified types as type parameters.
|
ResolvedType |
TypeResolver.resolve(GenericType<?> generic)
Factory method for resolving given generic type, defined by using sub-class
instance of
GenericType |
ResolvedType |
TypeResolver.resolve(Type jdkType,
TypeBindings typeBindings)
Factory method for resolving specified Java
Type , given
TypeBindings needed to resolve any type variables. |
ResolvedType |
TypeResolver.resolveSubtype(ResolvedType supertype,
Class<?> subtype)
Factory method for constructing sub-classing specified type; class specified
as sub-class must be compatible according to basic Java inheritance rules
(subtype must propery extend or implement specified supertype).
|
protected ResolvedType[] |
TypeBindings.typeParameterArray() |
Modifier and Type | Method and Description |
---|---|
abstract List<ResolvedType> |
ResolvedType.getImplementedInterfaces()
Returns ordered list of interfaces (in declaration order) that this type
implements.
|
List<ResolvedType> |
ResolvedType.getTypeParameters()
Returns list of generic type declarations for this type, in order they
are declared in class description.
|
List<ResolvedType> |
TypeBindings.getTypeParameters()
Accessor for getting bound types in declaration order
|
List<ResolvedType> |
ResolvedType.typeParametersFor(Class<?> erasedSupertype)
Method that will try to find type parameterization this type
has for specified super type
|
Modifier and Type | Method and Description |
---|---|
protected void |
MemberResolver._gatherTypes(ResolvedType currentType,
Set<ClassKey> seenTypes,
List<ResolvedType> types) |
ResolvedArrayType |
TypeResolver.arrayType(ResolvedType elementType)
Factory method for constructing array type of given element type.
|
static TypeBindings |
TypeBindings.create(Class<?> erasedType,
ResolvedType[] types) |
static boolean |
TypeResolver.isSelfReference(ResolvedType type)
Helper method that can be used to checked whether given resolved type
(with erased type of
java.lang.Object ) is a placeholder
for "self-reference"; these are nasty recursive ("self") types
needed with some interfaces |
ResolvedType |
TypeResolver.resolve(Class<?> type,
ResolvedType... typeParameters)
Factory method for resolving given type (specified by type-erased class),
using specified types as type parameters.
|
ResolvedTypeWithMembers |
MemberResolver.resolve(ResolvedType mainType,
AnnotationConfiguration annotationConfig,
AnnotationOverrides annotationOverrides)
Method for constructing hierarchy object needed to fully resolve
member information, including basic type flattening as well as
addition of mix-in types in appropriate positions.
|
ResolvedType |
TypeResolver.resolveSubtype(ResolvedType supertype,
Class<?> subtype)
Factory method for constructing sub-classing specified type; class specified
as sub-class must be compatible according to basic Java inheritance rules
(subtype must propery extend or implement specified supertype).
|
TypeBindings |
TypeBindings.withAdditionalBinding(String name,
ResolvedType type)
Method for creating an instance that has same bindings as this object,
plus one additional binding
|
Modifier and Type | Method and Description |
---|---|
protected void |
MemberResolver._gatherTypes(ResolvedType currentType,
Set<ClassKey> seenTypes,
List<ResolvedType> types) |
static TypeBindings |
TypeBindings.create(Class<?> erasedType,
List<ResolvedType> typeList)
Factory method for constructing bindings for given class using specified type
parameters.
|
Modifier and Type | Field and Description |
---|---|
protected ResolvedType[] |
ResolvedConstructor._argumentTypes |
protected ResolvedType[] |
ResolvedMethod._argumentTypes |
protected ResolvedType |
RawMember._declaringType
ResolvedType (class with generic type parameters) that declared
this member |
protected ResolvedType |
ResolvedMember._declaringType
ResolvedType (class with generic type parameters) that declared
this member |
protected ResolvedType |
ResolvedMethod._returnType |
protected ResolvedType |
HierarchicType._type |
protected ResolvedType |
ResolvedField._type |
Modifier and Type | Method and Description |
---|---|
ResolvedType |
ResolvedConstructor.getArgumentType(int index) |
ResolvedType |
ResolvedMethod.getArgumentType(int index) |
ResolvedType |
RawMember.getDeclaringType() |
ResolvedType |
ResolvedMember.getDeclaringType() |
ResolvedType |
ResolvedMethod.getReturnType() |
ResolvedType |
HierarchicType.getType() |
ResolvedType |
ResolvedConstructor.getType() |
abstract ResolvedType |
ResolvedMember.getType()
Returns type of this member; if it has one, for methods this is the
return type, for fields field type, and for constructors null.
|
ResolvedType |
ResolvedMethod.getType() |
ResolvedType |
ResolvedField.getType() |
Constructor and Description |
---|
HierarchicType(ResolvedType type,
boolean mixin,
int priority) |
RawConstructor(ResolvedType context,
Constructor<?> constructor) |
RawField(ResolvedType context,
Field field) |
RawMember(ResolvedType context) |
RawMethod(ResolvedType context,
Method method) |
ResolvedConstructor(ResolvedType context,
Annotations ann,
Constructor<?> constructor,
ResolvedType[] argumentTypes) |
ResolvedConstructor(ResolvedType context,
Annotations ann,
Constructor<?> constructor,
ResolvedType[] argumentTypes) |
ResolvedField(ResolvedType context,
Annotations ann,
Field field,
ResolvedType type) |
ResolvedMember(ResolvedType context,
Annotations ann) |
ResolvedMethod(ResolvedType context,
Annotations ann,
Method method,
ResolvedType returnType,
ResolvedType[] argumentTypes) |
ResolvedMethod(ResolvedType context,
Annotations ann,
Method method,
ResolvedType returnType,
ResolvedType[] argumentTypes) |
Modifier and Type | Class and Description |
---|---|
class |
ResolvedArrayType |
class |
ResolvedInterfaceType |
class |
ResolvedObjectType
Type implementation for classes that do not represent interfaces,
primitive or array types.
|
class |
ResolvedPrimitiveType
Type used for Java primitive types (which does not include arrays here).
|
class |
ResolvedRecursiveType
Specialized type placeholder used in cases where type definition is
recursive; to avoid infinite loop, reference that would be "back" in
hierarchy is represented by an instance of this class.
|
class |
TypePlaceHolder
Placeholder used for resolving type assignments to figure out
type parameters for subtypes.
|
Modifier and Type | Field and Description |
---|---|
protected ResolvedType |
TypePlaceHolder._actualType
Type assigned during wildcard resolution
|
protected ResolvedType |
ResolvedArrayType._elementType |
protected ResolvedType |
ResolvedRecursiveType._referencedType
Actual fully resolved type; assigned once resultion is complete
|
protected ResolvedType[] |
ResolvedInterfaceType._superInterfaces
List of interfaces this type implements; may be empty but never null
|
protected ResolvedType[] |
ResolvedObjectType._superInterfaces
List of interfaces this type implements; may be empty but never null
|
Modifier and Type | Method and Description |
---|---|
ResolvedType |
TypePlaceHolder.actualType() |
ResolvedType |
ResolvedInterfaceType.getArrayElementType() |
ResolvedType |
ResolvedObjectType.getArrayElementType() |
ResolvedType |
ResolvedArrayType.getArrayElementType() |
ResolvedType |
ResolvedRecursiveType.getArrayElementType()
To avoid infinite loops, will return null type
|
ResolvedType |
ResolvedPrimitiveType.getArrayElementType() |
ResolvedType |
TypePlaceHolder.getArrayElementType() |
ResolvedType |
ResolvedInterfaceType.getParentClass() |
ResolvedType |
ResolvedArrayType.getParentClass() |
ResolvedType |
ResolvedRecursiveType.getParentClass()
To avoid infinite loops, will return null;
|
ResolvedType |
ResolvedPrimitiveType.getParentClass() |
ResolvedType |
TypePlaceHolder.getParentClass() |
ResolvedType |
ResolvedInterfaceType.getSelfReferencedType() |
ResolvedType |
ResolvedObjectType.getSelfReferencedType() |
ResolvedType |
ResolvedArrayType.getSelfReferencedType() |
ResolvedType |
ResolvedRecursiveType.getSelfReferencedType() |
ResolvedType |
ResolvedPrimitiveType.getSelfReferencedType() |
ResolvedType |
TypePlaceHolder.getSelfReferencedType() |
Modifier and Type | Method and Description |
---|---|
List<ResolvedType> |
ResolvedInterfaceType.getImplementedInterfaces() |
List<ResolvedType> |
ResolvedObjectType.getImplementedInterfaces() |
List<ResolvedType> |
ResolvedArrayType.getImplementedInterfaces() |
List<ResolvedType> |
ResolvedRecursiveType.getImplementedInterfaces()
To avoid infinite loops, will return empty list
|
List<ResolvedType> |
ResolvedPrimitiveType.getImplementedInterfaces() |
List<ResolvedType> |
TypePlaceHolder.getImplementedInterfaces() |
Modifier and Type | Method and Description |
---|---|
void |
TypePlaceHolder.actualType(ResolvedType t) |
void |
ResolvedRecursiveType.setReference(ResolvedType ref) |
Constructor and Description |
---|
ResolvedArrayType(Class<?> erased,
TypeBindings bindings,
ResolvedObjectType superclass,
ResolvedType elementType) |
ResolvedInterfaceType(Class<?> erased,
TypeBindings bindings,
ResolvedType[] superInterfaces) |
ResolvedObjectType(Class<?> erased,
TypeBindings bindings,
ResolvedObjectType superClass,
ResolvedType[] interfaces) |
Constructor and Description |
---|
ResolvedObjectType(Class<?> erased,
TypeBindings bindings,
ResolvedObjectType superClass,
List<ResolvedType> interfaces) |
Modifier and Type | Method and Description |
---|---|
ResolvedType |
ResolvedTypeCache.find(ResolvedTypeCache.Key key) |
Modifier and Type | Method and Description |
---|---|
void |
ResolvedTypeCache.add(ResolvedType type) |
ResolvedTypeCache.Key |
ResolvedTypeCache.key(Class<?> simpleType,
ResolvedType[] tp)
Helper method for constructing reusable cache keys
|
void |
ResolvedTypeCache.put(ResolvedTypeCache.Key key,
ResolvedType type) |
Constructor and Description |
---|
ResolvedTypeCache.Key(Class<?> erasedType,
ResolvedType[] tp) |
Copyright © 2012 fasterxml.com. All Rights Reserved.