Package com.fasterxml.classmate
Class ResolvedTypeWithMembers
java.lang.Object
com.fasterxml.classmate.ResolvedTypeWithMembers
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
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 Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Helper class we use to reduce number of calls toAnnotationConfiguration
; mostly because determination may be expensive. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ResolvedTypeWithMembers.AnnotationHandler
Handler for resolving annotation informationprotected Filter
<RawConstructor> Filter to use for selecting constructors to includeprotected ResolvedConstructor[]
Filter to use for selecting fields to includeprotected final HierarchicType
Leaf of the type hierarchy, i.e.protected ResolvedField[]
protected ResolvedMethod[]
Filter to use for selecting methods to includeprotected ResolvedField[]
protected ResolvedMethod[]
protected final TypeResolver
Need to be able to resolve member types stillprotected final HierarchicType[]
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 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
ConstructorsConstructorDescriptionResolvedTypeWithMembers
(TypeResolver typeResolver, AnnotationConfiguration annotationConfig, HierarchicType mainType, HierarchicType[] types, Filter<RawConstructor> constructorFilter, Filter<RawField> fieldFilter, Filter<RawMethod> methodFilter) -
Method Summary
Modifier and TypeMethodDescriptionAccessor for getting full type hierarchy as priority-ordered list, from the lowest precedence to highest precedence (main type, its mix-in overrides)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.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.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
methodCanInherit
(Annotation annotation) Accessor for finding just overrides for the main type (if any).protected boolean
parameterCanInherit
(Annotation annotation) protected ResolvedConstructor
Method for resolving individual constructor completelyprotected ResolvedConstructor[]
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 completelyprotected ResolvedField[]
Method for fully resolving field definitions and associated annotations.protected ResolvedMethod[]
protected ResolvedMethod
resolveMethod
(RawMethod raw) Method for resolving individual method completelyprotected ResolvedField[]
Method for fully resolving static field definitions and associated annotations.protected ResolvedMethod[]
Method that will actually resolve full information (types, annotations) for static methods, using configured filter.int
size()
-
Field Details
-
NO_RESOLVED_TYPES
-
NO_RESOLVED_METHODS
-
NO_RESOLVED_FIELDS
-
NO_RESOLVED_CONSTRUCTORS
-
DEFAULT_ANNOTATION_CONFIG
Default annotation configuration is to ignore all annotations types. -
_typeResolver
Need to be able to resolve member types still -
_annotationHandler
Handler for resolving annotation information -
_mainType
Leaf of the type hierarchy, i.e. type from which this hierarchy was generated. -
_types
All types that hierarchy contains, in order of increasing precedence (that is, later entries override members of earlier members) -
_fieldFilter
Filter to use for selecting fields to include -
_constructorFilter
Filter to use for selecting constructors to include -
_methodFilter
Filter to use for selecting methods to include -
_staticMethods
-
_staticFields
-
_memberMethods
-
_memberFields
-
_constructors
-
-
Constructor Details
-
ResolvedTypeWithMembers
public ResolvedTypeWithMembers(TypeResolver typeResolver, AnnotationConfiguration annotationConfig, HierarchicType mainType, HierarchicType[] types, Filter<RawConstructor> constructorFilter, Filter<RawField> fieldFilter, Filter<RawMethod> methodFilter)
-
-
Method Details
-
size
public int size() -
allTypesAndOverrides
Accessor for getting full type hierarchy as priority-ordered list, from the lowest precedence to highest precedence (main type, its mix-in overrides) -
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. -
overridesOnly
Accessor for finding just overrides for the main type (if any). -
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
-
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. -
getMemberFields
-
getMemberMethods
-
getConstructors
-
resolveConstructors
Method that will actually resolve full information (types, annotations) for constructors of the main type. -
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. -
resolveMemberMethods
-
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
-
resolveStaticMethods
Method that will actually resolve full information (types, annotations) for static methods, using configured filter. -
resolveConstructor
Method for resolving individual constructor completely -
resolveField
Method for resolving individual field completely -
resolveMethod
Method for resolving individual method completely -
methodCanInherit
-
parameterCanInherit
-