Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.introspect

public Class PotentialCreator

extends Object
Class Inheritance
Imports
java.util.List, com.fasterxml.jackson.annotation.JsonCreator, com.fasterxml.jackson.databind.AnnotationIntrospector, .PropertyName, com.fasterxml.jackson.databind.cfg.MapperConfig

Information about a single Creator (constructor or factory method), kept during property introspection.
Since
2.18

Field Summary

Modifier and TypeField and Description
private final AnnotatedWithParams
private JsonCreator.Mode
_creatorMode

Declared Mode of the creator, if explicitly annotated; null otherwise

private PropertyName[]
private PropertyName[]
private final boolean
private static final PropertyName[]
private List<BeanPropertyDefinition>
propertyDefs

Parameter definitions if (and only if) this represents a Property-based Creator.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public AnnotatedWithParams
public JsonCreator.Mode

Returns:

Mode declared for this Creator by annotation, if any; null if not annotated
creatorMode
()

public JsonCreator.Mode
creatorModeOrDefault()

Same as creatorMode() except that if null was to be returned, will instead return JsonCreator.Mode.DEFAULT/

public PropertyName
explicitName(int ix)

public boolean
public boolean
hasNameFor(int ix)

public boolean
public PropertyName
implicitName(int ix)

public String
public PotentialCreator
public PotentialCreator
introspectParamNames(MapperConfig<?> config, PropertyName[] implicits)

Variant used when implicit names are known; such as case for JDK Record types.

public boolean
public PotentialCreator

Returns:

This creator instance
overrideMode
(JsonCreator.Mode
Mode to set creatorMode to
mode
)

Method that can be called to change the creatorMode this Creator has: typically used to "mark" Creator as JsonCreator.Mode.DELEGATING or JsonCreator.Mode.PROPERTIES when further information is gathered).

public AnnotatedParameter
param(int ix)

public int
public BeanPropertyDefinition[]
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_creatorback to summary
private final AnnotatedWithParams _creator
_creatorModeback to summary
private JsonCreator.Mode _creatorMode

Declared Mode of the creator, if explicitly annotated; null otherwise

_explicitParamNamesback to summary
private PropertyName[] _explicitParamNames
_implicitParamNamesback to summary
private PropertyName[] _implicitParamNames
_isAnnotatedback to summary
private final boolean _isAnnotated
NO_NAMESback to summary
private static final PropertyName[] NO_NAMES
propertyDefsback to summary
private List<BeanPropertyDefinition> propertyDefs

Parameter definitions if (and only if) this represents a Property-based Creator.

Constructor Detail

PotentialCreatorback to summary
public PotentialCreator(AnnotatedWithParams cr, JsonCreator.Mode cm)

Method Detail

assignPropertyDefsback to summary
public void assignPropertyDefs(List<? extends BeanPropertyDefinition> propertyDefs)
Annotations
@SuppressWarnings:unchecked
creatorback to summary
public AnnotatedWithParams creator()
creatorModeback to summary
public JsonCreator.Mode creatorMode()
Returns:JsonCreator.Mode

Mode declared for this Creator by annotation, if any; null if not annotated

creatorModeOrDefaultback to summary
public JsonCreator.Mode creatorModeOrDefault()

Same as creatorMode() except that if null was to be returned, will instead return JsonCreator.Mode.DEFAULT/

explicitNameback to summary
public PropertyName explicitName(int ix)
hasExplicitNamesback to summary
public boolean hasExplicitNames()
hasNameForback to summary
public boolean hasNameFor(int ix)
hasNameOrInjectForAllParamsback to summary
public boolean hasNameOrInjectForAllParams(MapperConfig<?> config)
implicitNameback to summary
public PropertyName implicitName(int ix)
implicitNameSimpleback to summary
public String implicitNameSimple(int ix)
introspectParamNamesback to summary
public PotentialCreator introspectParamNames(MapperConfig<?> config)
introspectParamNamesback to summary
public PotentialCreator introspectParamNames(MapperConfig<?> config, PropertyName[] implicits)

Variant used when implicit names are known; such as case for JDK Record types.

isAnnotatedback to summary
public boolean isAnnotated()
overrideModeback to summary
public PotentialCreator overrideMode(JsonCreator.Mode mode)

Method that can be called to change the creatorMode this Creator has: typically used to "mark" Creator as JsonCreator.Mode.DELEGATING or JsonCreator.Mode.PROPERTIES when further information is gathered).

Parameters
mode:JsonCreator.Mode

Mode to set creatorMode to

Returns:PotentialCreator

This creator instance

paramback to summary
public AnnotatedParameter param(int ix)
paramCountback to summary
public int paramCount()
propertyDefsback to summary
public BeanPropertyDefinition[] propertyDefs()
toStringback to summary
public String toString()

Overrides java.lang.Object.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.

Returns:String

a string representation of the object

Annotations
@Override