Package com.fasterxml.classmate
Class MemberResolver
- java.lang.Object
-
- com.fasterxml.classmate.MemberResolver
-
- All Implemented Interfaces:
java.io.Serializable
public class MemberResolver extends java.lang.Object implements java.io.Serializable
Builder class used to completely resolve members (fields, methods, constructors) ofResolvedType
s (generics-aware classes).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_cfgIncludeLangObject
Configuration setting that determines whether members fromObject
are included or not; by default false meaning that they are not.protected Filter<RawConstructor>
_constructorFilter
Filter used for determining whether given constructor is to be included in aggregation of all constructors.protected Filter<RawField>
_fieldFilter
Filter used for determining whether given field (static or member) is to be included in aggregation of all fields.protected Filter<RawMethod>
_methodFilter
Filter used for determining whether given method (static or member) is to be included in aggregation of all methods.protected TypeResolver
_typeResolver
Type resolved needed for resolving types of member objects (method argument and return; field types; constructor argument types)
-
Constructor Summary
Constructors Constructor Description MemberResolver(TypeResolver typeResolver)
Constructor for resolver that does not includejava.lang.Object
in type hierarchy
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_addOverrides(java.util.List<HierarchicType> typesWithOverrides, java.util.Set<ClassKey> seenTypes, ResolvedType override)
private void
_addOverrides(java.util.List<HierarchicType> typesWithOverrides, java.util.Set<ClassKey> seenTypes, java.lang.Class<?> override)
protected void
_gatherTypes(ResolvedType currentType, java.util.Set<ClassKey> seenTypes, java.util.List<ResolvedType> types)
ResolvedTypeWithMembers
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.MemberResolver
setConstructorFilter(Filter<RawConstructor> f)
MemberResolver
setFieldFilter(Filter<RawField> f)
MemberResolver
setIncludeLangObject(boolean state)
Configuration method for specifying whether members ofjava.lang.Object
are to be included in resolution; if false, no members fromObject
are to be included; if true, will be included.MemberResolver
setMethodFilter(Filter<RawMethod> f)
-
-
-
Field Detail
-
_typeResolver
protected final TypeResolver _typeResolver
Type resolved needed for resolving types of member objects (method argument and return; field types; constructor argument types)
-
_cfgIncludeLangObject
protected boolean _cfgIncludeLangObject
Configuration setting that determines whether members fromObject
are included or not; by default false meaning that they are not.
-
_fieldFilter
protected Filter<RawField> _fieldFilter
Filter used for determining whether given field (static or member) is to be included in aggregation of all fields.
-
_methodFilter
protected Filter<RawMethod> _methodFilter
Filter used for determining whether given method (static or member) is to be included in aggregation of all methods.
-
_constructorFilter
protected Filter<RawConstructor> _constructorFilter
Filter used for determining whether given constructor is to be included in aggregation of all constructors.
-
-
Constructor Detail
-
MemberResolver
public MemberResolver(TypeResolver typeResolver)
Constructor for resolver that does not includejava.lang.Object
in type hierarchy
-
-
Method Detail
-
setIncludeLangObject
public MemberResolver setIncludeLangObject(boolean state)
Configuration method for specifying whether members ofjava.lang.Object
are to be included in resolution; if false, no members fromObject
are to be included; if true, will be included.
-
setFieldFilter
public MemberResolver setFieldFilter(Filter<RawField> f)
-
setMethodFilter
public MemberResolver setMethodFilter(Filter<RawMethod> f)
-
setConstructorFilter
public MemberResolver setConstructorFilter(Filter<RawConstructor> f)
-
resolve
public ResolvedTypeWithMembers 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.- Parameters:
mainType
- Resolved type that is the starting point (i.e. the leaf class) for member resolution.annotationConfig
- Configuration of annotation types; which ones to include, how to inheritannotationOverrides
- Definitions of annotation overrides to use, if any (may be null)
-
_addOverrides
private void _addOverrides(java.util.List<HierarchicType> typesWithOverrides, java.util.Set<ClassKey> seenTypes, java.lang.Class<?> override)
-
_addOverrides
private void _addOverrides(java.util.List<HierarchicType> typesWithOverrides, java.util.Set<ClassKey> seenTypes, ResolvedType override)
-
_gatherTypes
protected void _gatherTypes(ResolvedType currentType, java.util.Set<ClassKey> seenTypes, java.util.List<ResolvedType> types)
-
-