Top Inners Fields Constructors Methods
com.fasterxml.jackson.jr.annotationsupport

public Class AnnotationBasedIntrospector

extends Object
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.reflect.*, java.util.*, com.fasterxml.jackson.annotation.JsonAlias, .JsonAutoDetect, .JsonIgnore, .JsonIgnoreProperties, .JsonProperty, .JsonPropertyOrder, com.fasterxml.jackson.jr.ob.JSON, com.fasterxml.jackson.jr.ob.impl.BeanConstructors, .JSONReader, .JSONWriter, .POJODefinition

Since
2.11

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
protected static class

Field Summary

Modifier and TypeField and Description
protected int
protected final boolean
protected Set<String>
protected final Map<String, AnnotationBasedIntrospector.APropBuilder>
protected final Class<?>
protected final JsonAutoDetect.Value
_visibility

Visibility settings to use for auto-detecting accessors.

Constructor Summary

AccessConstructor and Description
protected
AnnotationBasedIntrospector(Class<?> type, boolean serialization, JsonAutoDetect.Value visibility, int features)

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
protected void
protected static String
_decap(String name)

protected <ANN extends Annotation> ANN
_find(AnnotatedElement elem, Class<ANN> annotationType)

protected AnnotationBasedIntrospector.APropBuilder

Returns:

Property (builder) if found; null if none
_findAndRemoveByName
(String
Name of property to find (either primary [checked first] or secondary)
name
)

Helper method for locating a property (builder) identified by given name (either primary, or secondary), and if found, removing from main properties Map, returning.

protected String
protected void
protected void
_findFields(final Class<?> currType)

protected Collection<String>

Returns:

List of property names that defines order (possibly partial); if none, empty List (but never null)
_findIgnorableNames
()

Lookup method for finding a set of property names for the type this introspector is to introspect that should be ignored (both for serialization and deserialization).

protected void
protected void
_findMethods(final Class<?> currType)

protected List<String>

Returns:

List of property names that defines order (possibly partial); if none, empty List (but never null)
_findNameSortOrder
()

Lookup method for finding possible annotated order of property names for the type this introspector is to introspect

protected Boolean
protected boolean
protected boolean
_isGetterVisible(Method m, boolean isIsGetter)

protected boolean
protected AnnotationBasedIntrospector.APropBuilder
protected POJODefinition.Prop[]
_pruneProperties(boolean sortProperties)

protected POJODefinition
public static POJODefinition
public static POJODefinition
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_featuresback to summary
protected int _features
_forSerializationback to summary
protected final boolean _forSerialization
_ignorableNamesback to summary
protected Set<String> _ignorableNames
_propsback to summary
protected final Map<String, AnnotationBasedIntrospector.APropBuilder> _props
_typeback to summary
protected final Class<?> _type
_visibilityback to summary
protected final JsonAutoDetect.Value _visibility

Visibility settings to use for auto-detecting accessors.

Constructor Detail

AnnotationBasedIntrospectorback to summary
protected AnnotationBasedIntrospector(Class<?> type, boolean serialization, JsonAutoDetect.Value visibility, int features)

Method Detail

_addIgnoralback to summary
protected void _addIgnoral(String name)
_checkGetterMethodback to summary
protected void _checkGetterMethod(Method m)
_checkSetterMethodback to summary
protected void _checkSetterMethod(Method m)
_decapback to summary
protected static String _decap(String name)
_findback to summary
protected <ANN extends Annotation> ANN _find(AnnotatedElement elem, Class<ANN> annotationType)
_findAndRemoveByNameback to summary
protected AnnotationBasedIntrospector.APropBuilder _findAndRemoveByName(String name)

Helper method for locating a property (builder) identified by given name (either primary, or secondary), and if found, removing from main properties Map, returning.

Parameters
name:String

Name of property to find (either primary [checked first] or secondary)

Returns:AnnotationBasedIntrospector.APropBuilder

Property (builder) if found; null if none

_findExplicitNameback to summary
protected String _findExplicitName(AnnotatedElement m)
_findFieldsback to summary
protected void _findFields()
_findFieldsback to summary
protected void _findFields(final Class<?> currType)
_findIgnorableNamesback to summary
protected Collection<String> _findIgnorableNames()

Lookup method for finding a set of property names for the type this introspector is to introspect that should be ignored (both for serialization and deserialization).

Returns:Collection<String>

List of property names that defines order (possibly partial); if none, empty List (but never null)

_findMethodsback to summary
protected void _findMethods()
_findMethodsback to summary
protected void _findMethods(final Class<?> currType)
_findNameSortOrderback to summary
protected List<String> _findNameSortOrder()

Lookup method for finding possible annotated order of property names for the type this introspector is to introspect

Returns:List<String>

List of property names that defines order (possibly partial); if none, empty List (but never null)

_hasIgnoreMarkerback to summary
protected Boolean _hasIgnoreMarker(AnnotatedElement m)
_isFieldVisibleback to summary
protected boolean _isFieldVisible(Field f)
_isGetterVisibleback to summary
protected boolean _isGetterVisible(Method m, boolean isIsGetter)
_isSetterVisibleback to summary
protected boolean _isSetterVisible(Method m)
_propBuilderback to summary
protected AnnotationBasedIntrospector.APropBuilder _propBuilder(String name)
_prunePropertiesback to summary
protected POJODefinition.Prop[] _pruneProperties(boolean sortProperties)
introspectDefinitionback to summary
protected POJODefinition introspectDefinition()
pojoDefinitionForDeserializationback to summary
public static POJODefinition pojoDefinitionForDeserialization(JSONReader r, Class<?> pojoType, JsonAutoDetect.Value visibility)
pojoDefinitionForSerializationback to summary
public static POJODefinition pojoDefinitionForSerialization(JSONWriter w, Class<?> pojoType, JsonAutoDetect.Value visibility)
com.fasterxml.jackson.jr.annotationsupport back to summary

protected Class AnnotationBasedIntrospector.APropAccessor<ACC extends AccessibleObject>

extends Object
Class Inheritance
  • java.lang.Object
  • com.fasterxml.jackson.jr.annotationsupport.AnnotationBasedIntrospector.APropAccessor

Field Summary

Modifier and TypeField and Description
public final ACC
public final boolean
public final boolean
public final boolean
public final boolean
public final String

Constructor Summary

AccessConstructor and Description
protected
APropAccessor(String n, ACC acc, boolean expl, boolean nameExpl, boolean ignore, boolean visible)

Method Summary

Modifier and TypeMethod and Description
public static <T extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<T>
createExplicit(String name, T accessor)

public static <T extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<T>
createIgnorable(String name, T accessor)

public static <T extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<T>
createImplicit(String name, T accessor, boolean visible)

public static <T extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<T>
createVisible(String name, T accessor)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessorback to summary
public final ACC accessor
isExplicitback to summary
public final boolean isExplicit
isNameExplicitback to summary
public final boolean isNameExplicit
isToIgnoreback to summary
public final boolean isToIgnore
isVisibleback to summary
public final boolean isVisible
nameback to summary
public final String name

Constructor Detail

APropAccessorback to summary
protected APropAccessor(String n, ACC acc, boolean expl, boolean nameExpl, boolean ignore, boolean visible)

Method Detail

createExplicitback to summary
public static <T extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<T> createExplicit(String name, T accessor)
createIgnorableback to summary
public static <T extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<T> createIgnorable(String name, T accessor)
createImplicitback to summary
public static <T extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<T> createImplicit(String name, T accessor, boolean visible)
createVisibleback to summary
public static <T extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<T> createVisible(String name, T accessor)
com.fasterxml.jackson.jr.annotationsupport back to summary

protected Class AnnotationBasedIntrospector.APropBuilder

extends Object
implements Comparable<AnnotationBasedIntrospector.APropBuilder>
Class Inheritance
  • java.lang.Object
  • com.fasterxml.jackson.jr.annotationsupport.AnnotationBasedIntrospector.APropBuilder
All Implemented Interfaces
java.lang.Comparable

Field Summary

Modifier and TypeField and Description
protected AnnotationBasedIntrospector.APropAccessor<Field>
protected AnnotationBasedIntrospector.APropAccessor<Method>
public final String
public final String
origName

Initial name from accessor ("implicit" or "internal" name); not changed with renames

protected AnnotationBasedIntrospector.APropAccessor<Method>

Constructor Summary

AccessConstructor and Description
public
protected

Method Summary

Modifier and TypeMethod and Description
private static Set<String>
private String
private static <A extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<A>
public boolean
public boolean
public boolean
public POJODefinition.Prop
asProperty(boolean collectAliases)

public Set<String>
public int
compareTo(AnnotationBasedIntrospector.APropBuilder
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public boolean
public String
findPrimaryExplicitName(boolean forSer)

public static AnnotationBasedIntrospector.APropBuilder
public void
public void
public AnnotationBasedIntrospector.APropBuilder
withName(String newName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fieldback to summary
protected AnnotationBasedIntrospector.APropAccessor<Field> field
getterback to summary
protected AnnotationBasedIntrospector.APropAccessor<Method> getter
nameback to summary
public final String name
origNameback to summary
public final String origName

Initial name from accessor ("implicit" or "internal" name); not changed with renames

setterback to summary
protected AnnotationBasedIntrospector.APropAccessor<Method> setter

Constructor Detail

APropBuilderback to summary
public APropBuilder(String n)
APropBuilderback to summary
protected APropBuilder(AnnotationBasedIntrospector.APropBuilder base, String n)

Method Detail

_collectAliasesback to summary
private static Set<String> _collectAliases(AnnotationBasedIntrospector.APropAccessor<?> acc, Set<String> collectedAliases)
_firstExplicitback to summary
private String _firstExplicit(AnnotationBasedIntrospector.APropAccessor<?> acc1, AnnotationBasedIntrospector.APropAccessor<?> acc2, AnnotationBasedIntrospector.APropAccessor<?> acc3)
_mergeback to summary
private static <A extends AccessibleObject> AnnotationBasedIntrospector.APropAccessor<A> _merge(AnnotationBasedIntrospector.APropAccessor<A> a1, AnnotationBasedIntrospector.APropAccessor<A> a2)
anyExplicitback to summary
public boolean anyExplicit()
anyIgnoralsback to summary
public boolean anyIgnorals()
anyVisibleback to summary
public boolean anyVisible()
asPropertyback to summary
public POJODefinition.Prop asProperty(boolean collectAliases)
collectAliasesback to summary
public Set<String> collectAliases()
compareToback to summary
public int compareTo(AnnotationBasedIntrospector.APropBuilder o)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
o:AnnotationBasedIntrospector.APropBuilder

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
couldDeserializeback to summary
public boolean couldDeserialize()
findPrimaryExplicitNameback to summary
public String findPrimaryExplicitName(boolean forSer)
mergeback to summary
public static AnnotationBasedIntrospector.APropBuilder merge(AnnotationBasedIntrospector.APropBuilder b1, AnnotationBasedIntrospector.APropBuilder b2)
removeIgnoredback to summary
public void removeIgnored()
removeNonVisibleback to summary
public void removeNonVisible()
withNameback to summary
public AnnotationBasedIntrospector.APropBuilder withName(String newName)