Top Inners Fields Constructors Methods
tools.jackson.databind.introspect

public final Class AnnotatedClass

extends Annotated
implements TypeResolutionContext
Class Inheritance
All Implemented Interfaces
tools.jackson.databind.introspect.TypeResolutionContext
Imports
java.lang.annotation.Annotation, java.lang.reflect.*, java.util.*, java.util.stream.Stream, tools.jackson.databind.JavaType, tools.jackson.databind.cfg.MapperConfig, tools.jackson.databind.type.TypeBindings, tools.jackson.databind.util.Annotations, .ClassUtil

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
protected final TypeBindings
_bindings

Type bindings to use for members of _class.

protected final Class<?>
_class

Type erased Class matching _type.

protected final Annotations
_classAnnotations

Combined list of Jackson annotations that the class has, including inheritable ones from super classes and interfaces

protected final boolean
_collectAnnotations

Flag that indicates whether (full) annotation resolution should occur: is disabled for all JDK types.

protected final MapperConfig<?>
protected AnnotatedClass.Creators
protected List<AnnotatedField>
_fields

Member fields of interest: ones that are either public, or have at least one annotation.

protected AnnotatedMethodMap
_memberMethods

Member methods of interest; for now ones with 0 or 1 arguments (just optimization, since others won't be used now)

protected final MixInResolver
_mixInResolver

Object that knows mapping of mix-in classes (ones that contain annotations to add) with their target classes (ones that get these additional annotations "mixed in").

protected transient Boolean
_nonStaticInnerClass

Lazily determined property to see if this is a non-static inner class.

protected final Class<?>
_primaryMixIn

Primary mix-in class; one to use for the annotated class itself.

protected final List<JavaType>
_superTypes

Ordered set of super classes and interfaces of the class itself: included in order of precedence

protected final JavaType
_type

Resolved Java type for which information is collected: also works as context for resolving possible generic type of accessors declared in this type.

private static final AnnotatedClass.Creators

Constructor Summary

AccessConstructor and Description
pack-priv
AnnotatedClass(MapperConfig<?> config, JavaType
Fully resolved type; may be `null`, but ONLY if no member fields or methods are to be accessed
type
,
Class<?>
Type-erased class; pass if no `type` needed or available
rawType
,
List<JavaType> superTypes, Class<?> primaryMixIn, Annotations classAnnotations, TypeBindings bindings, MixInResolver mir, boolean collectAnnotations)

Constructor will not do any initializations, to allow for configuring instances differently depending on use cases

pack-priv
AnnotatedClass(Class<?> rawType)

Constructor (only) used for creating primordial simple types (during bootstrapping) and array type placeholders where no fields or methods are needed.

Method Summary

Modifier and TypeMethod and Description
private final AnnotatedClass.Creators
private final List<AnnotatedField>
private final AnnotatedMethodMap
public Stream<Annotation>
public boolean
equals(Object o)

Implements abstract tools.jackson.databind.introspect.Annotated.equals.

Indicates whether some other object is "equal to" this one.

public Iterable<AnnotatedField>
public AnnotatedMethod
findMethod(String name, Class<?>[] paramTypes)

public Class<?>
getAnnotated()

Implements abstract tools.jackson.databind.introspect.Annotated.getAnnotated.

Method that can be used to find actual JDK element that this instance represents.

public <A extends Annotation> A
public Annotations
public List<AnnotatedConstructor>
public AnnotatedConstructor
public List<AnnotatedMethod>
public int
public int
public int
public String
public Class<?>
getRawType()

Implements abstract tools.jackson.databind.introspect.Annotated.getRawType.

"Raw" type (type-erased class) of the annotated element; definition of what exactly this means depends on sub-class.

public JavaType
getType()

Implements abstract tools.jackson.databind.introspect.Annotated.getType.

Full generic type of the annotated element; definition of what exactly this means depends on sub-class.

public boolean
public boolean
public int
hashCode()

Implements abstract tools.jackson.databind.introspect.Annotated.hashCode.

Returns a hash code value for this object.

public boolean
hasOneOf(Class<? extends Annotation>[] annoClasses)

Implements abstract tools.jackson.databind.introspect.Annotated.hasOneOf.

public boolean
public Iterable<AnnotatedMethod>
public JavaType
public String
toString()

Implements abstract tools.jackson.databind.introspect.Annotated.toString.

Returns a string representation of the object.

Inherited from tools.jackson.databind.introspect.Annotated:
isPublicisStatic

Field Detail

_bindingsback to summary
protected final TypeBindings _bindings

Type bindings to use for members of _class.

_classback to summary
protected final Class<?> _class

Type erased Class matching _type.

_classAnnotationsback to summary
protected final Annotations _classAnnotations

Combined list of Jackson annotations that the class has, including inheritable ones from super classes and interfaces

_collectAnnotationsback to summary
protected final boolean _collectAnnotations

Flag that indicates whether (full) annotation resolution should occur: is disabled for all JDK types.

_configback to summary
protected final MapperConfig<?> _config
_creatorsback to summary
protected AnnotatedClass.Creators _creators
_fieldsback to summary
protected List<AnnotatedField> _fields

Member fields of interest: ones that are either public, or have at least one annotation.

_memberMethodsback to summary
protected AnnotatedMethodMap _memberMethods

Member methods of interest; for now ones with 0 or 1 arguments (just optimization, since others won't be used now)

_mixInResolverback to summary
protected final MixInResolver _mixInResolver

Object that knows mapping of mix-in classes (ones that contain annotations to add) with their target classes (ones that get these additional annotations "mixed in").

_nonStaticInnerClassback to summary
protected transient Boolean _nonStaticInnerClass

Lazily determined property to see if this is a non-static inner class.

_primaryMixInback to summary
protected final Class<?> _primaryMixIn

Primary mix-in class; one to use for the annotated class itself. Can be null.

_superTypesback to summary
protected final List<JavaType> _superTypes

Ordered set of super classes and interfaces of the class itself: included in order of precedence

_typeback to summary
protected final JavaType _type

Resolved Java type for which information is collected: also works as context for resolving possible generic type of accessors declared in this type.

NO_CREATORSback to summary
private static final AnnotatedClass.Creators NO_CREATORS

Constructor Detail

AnnotatedClassback to summary
pack-priv AnnotatedClass(MapperConfig<?> config, JavaType type, Class<?> rawType, List<JavaType> superTypes, Class<?> primaryMixIn, Annotations classAnnotations, TypeBindings bindings, MixInResolver mir, boolean collectAnnotations)

Constructor will not do any initializations, to allow for configuring instances differently depending on use cases

Parameters
type:JavaType

Fully resolved type; may be `null`, but ONLY if no member fields or methods are to be accessed

rawType:Class<?>

Type-erased class; pass if no `type` needed or available

AnnotatedClassback to summary
pack-priv AnnotatedClass(Class<?> rawType)

Constructor (only) used for creating primordial simple types (during bootstrapping) and array type placeholders where no fields or methods are needed.

Method Detail

_creatorsback to summary
private final AnnotatedClass.Creators _creators()
_fieldsback to summary
private final List<AnnotatedField> _fields()
_methodsback to summary
private final AnnotatedMethodMap _methods()
annotationsback to summary
public Stream<Annotation> annotations()

Implements abstract tools.jackson.databind.introspect.Annotated.annotations.

Annotations
@Override
equalsback to summary
public boolean equals(Object o)

Implements abstract tools.jackson.databind.introspect.Annotated.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
fieldsback to summary
public Iterable<AnnotatedField> fields()
findMethodback to summary
public AnnotatedMethod findMethod(String name, Class<?>[] paramTypes)
getAnnotatedback to summary
public Class<?> getAnnotated()

Implements abstract tools.jackson.databind.introspect.Annotated.getAnnotated.

Doc from tools.jackson.databind.introspect.Annotated.getAnnotated.

Method that can be used to find actual JDK element that this instance represents. It is non-null, except for method/constructor parameters which do not have a JDK counterpart.

Annotations
@Override
getAnnotationback to summary
public <A extends Annotation> A getAnnotation(Class<A> acls)

Implements abstract tools.jackson.databind.introspect.Annotated.getAnnotation.

Annotations
@Override
getAnnotationsback to summary
public Annotations getAnnotations()
getConstructorsback to summary
public List<AnnotatedConstructor> getConstructors()
getDefaultConstructorback to summary
public AnnotatedConstructor getDefaultConstructor()
getFactoryMethodsback to summary
public List<AnnotatedMethod> getFactoryMethods()
getFieldCountback to summary
public int getFieldCount()
getMemberMethodCountback to summary
public int getMemberMethodCount()
getModifiersback to summary
public int getModifiers()

Implements abstract tools.jackson.databind.introspect.Annotated.getModifiers.

Annotations
@Override
getNameback to summary
public String getName()

Implements abstract tools.jackson.databind.introspect.Annotated.getName.

Annotations
@Override
getRawTypeback to summary
public Class<?> getRawType()

Implements abstract tools.jackson.databind.introspect.Annotated.getRawType.

Doc from tools.jackson.databind.introspect.Annotated.getRawType.

"Raw" type (type-erased class) of the annotated element; definition of what exactly this means depends on sub-class.

Annotations
@Override
getTypeback to summary
public JavaType getType()

Implements abstract tools.jackson.databind.introspect.Annotated.getType.

Doc from tools.jackson.databind.introspect.Annotated.getType.

Full generic type of the annotated element; definition of what exactly this means depends on sub-class.

Annotations
@Override
hasAnnotationback to summary
public boolean hasAnnotation(Class<? extends Annotation> acls)

Implements abstract tools.jackson.databind.introspect.Annotated.hasAnnotation.

Annotations
@Override
hasAnnotationsback to summary
public boolean hasAnnotations()
hashCodeback to summary
public int hashCode()

Implements abstract tools.jackson.databind.introspect.Annotated.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
hasOneOfback to summary
public boolean hasOneOf(Class<? extends Annotation>[] annoClasses)

Implements abstract tools.jackson.databind.introspect.Annotated.hasOneOf.

Annotations
@Override
isNonStaticInnerClassback to summary
public boolean isNonStaticInnerClass()
memberMethodsback to summary
public Iterable<AnnotatedMethod> memberMethods()
resolveTypeback to summary
public JavaType resolveType(Type type)

Implements tools.jackson.databind.introspect.TypeResolutionContext.resolveType.

Annotations
@Override
toStringback to summary
public String toString()

Implements abstract tools.jackson.databind.introspect.Annotated.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
tools.jackson.databind.introspect back to summary

public final Class AnnotatedClass.Creators

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final List<AnnotatedConstructor>
constructors

Single argument constructors the class has, if any.

public final List<AnnotatedMethod>
creatorMethods

Single argument static methods that might be usable as factory methods

public final AnnotatedConstructor
defaultConstructor

Default constructor of the annotated class, if it has one.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constructorsback to summary
public final List<AnnotatedConstructor> constructors

Single argument constructors the class has, if any.

creatorMethodsback to summary
public final List<AnnotatedMethod> creatorMethods

Single argument static methods that might be usable as factory methods

defaultConstructorback to summary
public final AnnotatedConstructor defaultConstructor

Default constructor of the annotated class, if it has one.

Constructor Detail

Creatorsback to summary
public Creators(AnnotatedConstructor defCtor, List<AnnotatedConstructor> ctors, List<AnnotatedMethod> ctorMethods)