Top Description Inners Fields Constructors Methods
com.fasterxml.classmate

public Class ResolvedTypeWithMembers

extends Object
Class Inheritance
Imports
java.lang.annotation.Annotation, .Inherited, java.lang.reflect.Constructor, .Field, .Method, .Type, java.util.*, com.fasterxml.classmate.members.*, com.fasterxml.classmate.util.MethodKey

Class that contains information about fully resolved members of a type; resolution meaning that masking is handled for methods, and all inheritable annotations are flattened using optional overrides as well ("mix-in annotations"). Instances are created by com.fasterxml.classmate.MemberResolver.

Note that instances are not thread-safe, as the expectation is that instances will not be shared (unlike raw members or resolved types)

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
ResolvedTypeWithMembers.AnnotationHandler

Helper class we use to reduce number of calls to AnnotationConfiguration; mostly because determination may be expensive.

Field Summary

Modifier and TypeField and Description
protected final ResolvedTypeWithMembers.AnnotationHandler
_annotationHandler

Handler for resolving annotation information

protected Filter<RawConstructor>
_constructorFilter

Filter to use for selecting constructors to include

protected ResolvedConstructor[]
protected Filter<RawField>
_fieldFilter

Filter to use for selecting fields to include

protected final HierarchicType
_mainType

Leaf of the type hierarchy, i.e. type from which this hierarchy was generated.

protected ResolvedField[]
protected ResolvedMethod[]
protected Filter<RawMethod>
_methodFilter

Filter to use for selecting methods to include

protected ResolvedField[]
protected ResolvedMethod[]
protected final TypeResolver
_typeResolver

Need to be able to resolve member types still

protected final HierarchicType[]
_types

All types that hierarchy contains, in order of increasing precedence (that is, later entries override members of earlier members)

protected static final AnnotationConfiguration
DEFAULT_ANNOTATION_CONFIG

Default annotation configuration is to ignore all annotations types.

private static final ResolvedConstructor[]
private static final ResolvedField[]
private static final ResolvedMethod[]
private static final ResolvedType[]

Constructor Summary

AccessConstructor and Description
public
ResolvedTypeWithMembers(TypeResolver typeResolver, AnnotationConfiguration annotationConfig, HierarchicType mainType, HierarchicType[] types, Filter<RawConstructor> constructorFilter, Filter<RawField> fieldFilter, Filter<RawMethod> methodFilter)

Method Summary

Modifier and TypeMethod and Description
public List<HierarchicType>
allTypesAndOverrides()

Accessor for getting full type hierarchy as priority-ordered list, from the lowest precedence to highest precedence (main type, its mix-in overrides)

public ResolvedConstructor[]
public ResolvedField[]
public ResolvedMethod[]
public ResolvedField[]
getStaticFields()

Method for finding all static fields of the main type (except for ones possibly filtered out by filter) and applying annotation overrides, if any, to annotations.

public ResolvedMethod[]
getStaticMethods()

Method for finding all static methods of the main type (except for ones possibly filtered out by filter) and applying annotation overrides, if any, to annotations.

public List<HierarchicType>
mainTypeAndOverrides()

Accessor for getting subset of type hierarchy which only contains main type and possible overrides (mix-ins) it has, but not supertypes or their overrides.

protected boolean
public List<HierarchicType>
overridesOnly()

Accessor for finding just overrides for the main type (if any).

protected boolean
protected ResolvedConstructor
resolveConstructor(RawConstructor raw)

Method for resolving individual constructor completely

protected ResolvedConstructor[]
resolveConstructors()

Method that will actually resolve full information (types, annotations) for constructors of the main type.

protected ResolvedField
resolveField(RawField raw)

Method for resolving individual field completely

protected ResolvedField[]
resolveMemberFields()

Method for fully resolving field definitions and associated annotations.

protected ResolvedMethod[]
protected ResolvedMethod
resolveMethod(RawMethod raw)

Method for resolving individual method completely

protected ResolvedField[]
resolveStaticFields()

Method for fully resolving static field definitions and associated annotations.

protected ResolvedMethod[]
resolveStaticMethods()

Method that will actually resolve full information (types, annotations) for static methods, using configured filter.

public int
size()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_annotationHandlerback to summary
protected final ResolvedTypeWithMembers.AnnotationHandler _annotationHandler

Handler for resolving annotation information

_constructorFilterback to summary
protected Filter<RawConstructor> _constructorFilter

Filter to use for selecting constructors to include

_constructorsback to summary
protected ResolvedConstructor[] _constructors
_fieldFilterback to summary
protected Filter<RawField> _fieldFilter

Filter to use for selecting fields to include

_mainTypeback to summary
protected final HierarchicType _mainType

Leaf of the type hierarchy, i.e. type from which this hierarchy was generated.

_memberFieldsback to summary
protected ResolvedField[] _memberFields
_memberMethodsback to summary
protected ResolvedMethod[] _memberMethods
_methodFilterback to summary
protected Filter<RawMethod> _methodFilter

Filter to use for selecting methods to include

_staticFieldsback to summary
protected ResolvedField[] _staticFields
_staticMethodsback to summary
protected ResolvedMethod[] _staticMethods
_typeResolverback to summary
protected final TypeResolver _typeResolver

Need to be able to resolve member types still

_typesback to summary
protected final HierarchicType[] _types

All types that hierarchy contains, in order of increasing precedence (that is, later entries override members of earlier members)

DEFAULT_ANNOTATION_CONFIGback to summary
protected static final AnnotationConfiguration DEFAULT_ANNOTATION_CONFIG

Default annotation configuration is to ignore all annotations types.

NO_RESOLVED_CONSTRUCTORSback to summary
private static final ResolvedConstructor[] NO_RESOLVED_CONSTRUCTORS
NO_RESOLVED_FIELDSback to summary
private static final ResolvedField[] NO_RESOLVED_FIELDS
NO_RESOLVED_METHODSback to summary
private static final ResolvedMethod[] NO_RESOLVED_METHODS
NO_RESOLVED_TYPESback to summary
private static final ResolvedType[] NO_RESOLVED_TYPES

Constructor Detail

ResolvedTypeWithMembersback to summary
public ResolvedTypeWithMembers(TypeResolver typeResolver, AnnotationConfiguration annotationConfig, HierarchicType mainType, HierarchicType[] types, Filter<RawConstructor> constructorFilter, Filter<RawField> fieldFilter, Filter<RawMethod> methodFilter)

Method Detail

allTypesAndOverridesback to summary
public List<HierarchicType> allTypesAndOverrides()

Accessor for getting full type hierarchy as priority-ordered list, from the lowest precedence to highest precedence (main type, its mix-in overrides)

getConstructorsback to summary
public ResolvedConstructor[] getConstructors()
getMemberFieldsback to summary
public ResolvedField[] getMemberFields()
getMemberMethodsback to summary
public ResolvedMethod[] getMemberMethods()
getStaticFieldsback to summary
public ResolvedField[] getStaticFields()

Method for finding all static fields of the main type (except for ones possibly filtered out by filter) and applying annotation overrides, if any, to annotations.

Since
1.2.0
getStaticMethodsback to summary
public ResolvedMethod[] getStaticMethods()

Method for finding all static methods of the main type (except for ones possibly filtered out by filter) and applying annotation overrides, if any, to annotations.

mainTypeAndOverridesback to summary
public List<HierarchicType> mainTypeAndOverrides()

Accessor for getting subset of type hierarchy which only contains main type and possible overrides (mix-ins) it has, but not supertypes or their overrides.

methodCanInheritback to summary
protected boolean methodCanInherit(Annotation annotation)
overridesOnlyback to summary
public List<HierarchicType> overridesOnly()

Accessor for finding just overrides for the main type (if any).

parameterCanInheritback to summary
protected boolean parameterCanInherit(Annotation annotation)
resolveConstructorback to summary
protected ResolvedConstructor resolveConstructor(RawConstructor raw)

Method for resolving individual constructor completely

resolveConstructorsback to summary
protected ResolvedConstructor[] resolveConstructors()

Method that will actually resolve full information (types, annotations) for constructors of the main type.

resolveFieldback to summary
protected ResolvedField resolveField(RawField raw)

Method for resolving individual field completely

resolveMemberFieldsback to summary
protected ResolvedField[] resolveMemberFields()

Method for fully resolving field definitions and associated annotations. Neither field definitions nor associated annotations inherit, but we may still need to add annotation overrides, as well as filter out filters and annotations that caller is not interested in.

resolveMemberMethodsback to summary
protected ResolvedMethod[] resolveMemberMethods()
resolveMethodback to summary
protected ResolvedMethod resolveMethod(RawMethod raw)

Method for resolving individual method completely

resolveStaticFieldsback to summary
protected ResolvedField[] resolveStaticFields()

Method for fully resolving static field definitions and associated annotations. Neither field definitions nor associated annotations inherit, but we may still need to add annotation overrides, as well as filter out filters and annotations that caller is not interested in.

Since
1.2.0
resolveStaticMethodsback to summary
protected ResolvedMethod[] resolveStaticMethods()

Method that will actually resolve full information (types, annotations) for static methods, using configured filter.

sizeback to summary
public int size()
com.fasterxml.classmate back to summary

private final Class ResolvedTypeWithMembers.AnnotationHandler

extends Object
Class Inheritance
  • java.lang.Object
  • com.fasterxml.classmate.ResolvedTypeWithMembers.AnnotationHandler

Helper class we use to reduce number of calls to AnnotationConfiguration; mostly because determination may be expensive.

Field Summary

Modifier and TypeField and Description
private final AnnotationConfiguration
private HashMap<Class<? extends Annotation>, AnnotationInclusion>
private HashMap<Class<? extends Annotation>, AnnotationInclusion>
private HashMap<Class<? extends Annotation>, AnnotationInclusion>
private HashMap<Class<? extends Annotation>, AnnotationInclusion>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public boolean
public AnnotationInclusion
public AnnotationInclusion
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_annotationConfigback to summary
private final AnnotationConfiguration _annotationConfig
_constructorInclusionsback to summary
private HashMap<Class<? extends Annotation>, AnnotationInclusion> _constructorInclusions
_fieldInclusionsback to summary
private HashMap<Class<? extends Annotation>, AnnotationInclusion> _fieldInclusions
_methodInclusionsback to summary
private HashMap<Class<? extends Annotation>, AnnotationInclusion> _methodInclusions
_parameterInclusionsback to summary
private HashMap<Class<? extends Annotation>, AnnotationInclusion> _parameterInclusions

Constructor Detail

AnnotationHandlerback to summary
public AnnotationHandler(AnnotationConfiguration annotationConfig)

Method Detail

includeConstructorAnnotationback to summary
public boolean includeConstructorAnnotation(Annotation ann)
includeFieldAnnotationback to summary
public boolean includeFieldAnnotation(Annotation ann)
includeMethodAnnotationback to summary
public boolean includeMethodAnnotation(Annotation ann)
includeParameterAnnotationback to summary
public boolean includeParameterAnnotation(Annotation ann)
methodInclusionback to summary
public AnnotationInclusion methodInclusion(Annotation ann)
parameterInclusionback to summary
public AnnotationInclusion parameterInclusion(Annotation ann)