public class CreatorCollector extends Object
ValueInstantiator
later on.Modifier and Type | Field and Description |
---|---|
protected SettableBeanProperty[] |
_arrayDelegateArgs |
protected BeanDescription |
_beanDesc
Type of bean being created
|
protected boolean |
_canFixAccess |
protected AnnotatedWithParams[] |
_creators
Set of creators we have collected so far
|
protected SettableBeanProperty[] |
_delegateArgs |
protected int |
_explicitCreators
Bitmask of creators that were explicitly marked as creators; false for
auto-detected (ones included base on naming and/or visibility, not
annotation)
|
protected boolean |
_forceAccess |
protected boolean |
_hasNonDefaultCreator |
protected SettableBeanProperty[] |
_propertyBasedArgs |
protected static int |
C_ARRAY_DELEGATE |
protected static int |
C_BIG_DECIMAL |
protected static int |
C_BIG_INTEGER |
protected static int |
C_BOOLEAN |
protected static int |
C_DEFAULT |
protected static int |
C_DELEGATE |
protected static int |
C_DOUBLE |
protected static int |
C_INT |
protected static int |
C_LONG |
protected static int |
C_PROPS |
protected static int |
C_STRING |
protected static String[] |
TYPE_DESCS |
Constructor and Description |
---|
CreatorCollector(BeanDescription beanDesc,
MapperConfig<?> config) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_isEnumValueOf(AnnotatedWithParams creator)
Helper method for recognizing `Enum.valueOf()` factory method
|
protected void |
_reportDuplicateCreator(int typeIndex,
boolean explicit,
AnnotatedWithParams oldOne,
AnnotatedWithParams newOne) |
void |
addBigDecimalCreator(AnnotatedWithParams creator,
boolean explicit) |
void |
addBigIntegerCreator(AnnotatedWithParams creator,
boolean explicit) |
void |
addBooleanCreator(AnnotatedWithParams creator,
boolean explicit) |
void |
addDelegatingCreator(AnnotatedWithParams creator,
boolean explicit,
SettableBeanProperty[] injectables,
int delegateeIndex) |
void |
addDoubleCreator(AnnotatedWithParams creator,
boolean explicit) |
void |
addIntCreator(AnnotatedWithParams creator,
boolean explicit) |
void |
addLongCreator(AnnotatedWithParams creator,
boolean explicit) |
void |
addPropertyCreator(AnnotatedWithParams creator,
boolean explicit,
SettableBeanProperty[] properties) |
void |
addStringCreator(AnnotatedWithParams creator,
boolean explicit) |
ValueInstantiator |
constructValueInstantiator(DeserializationContext ctxt) |
boolean |
hasDefaultCreator() |
boolean |
hasDelegatingCreator() |
boolean |
hasPropertyBasedCreator() |
void |
setDefaultCreator(AnnotatedWithParams creator)
Method called to indicate the default creator: no-arguments constructor
or factory method that is called to instantiate a value before populating
it with data.
|
protected boolean |
verifyNonDup(AnnotatedWithParams newOne,
int typeIndex,
boolean explicit) |
protected static final int C_DEFAULT
protected static final int C_STRING
protected static final int C_INT
protected static final int C_LONG
protected static final int C_BIG_INTEGER
protected static final int C_DOUBLE
protected static final int C_BIG_DECIMAL
protected static final int C_BOOLEAN
protected static final int C_DELEGATE
protected static final int C_PROPS
protected static final int C_ARRAY_DELEGATE
protected static final String[] TYPE_DESCS
protected final BeanDescription _beanDesc
protected final boolean _canFixAccess
protected final boolean _forceAccess
protected final AnnotatedWithParams[] _creators
protected int _explicitCreators
protected boolean _hasNonDefaultCreator
protected SettableBeanProperty[] _delegateArgs
protected SettableBeanProperty[] _arrayDelegateArgs
protected SettableBeanProperty[] _propertyBasedArgs
public CreatorCollector(BeanDescription beanDesc, MapperConfig<?> config)
public ValueInstantiator constructValueInstantiator(DeserializationContext ctxt) throws JsonMappingException
JsonMappingException
public void setDefaultCreator(AnnotatedWithParams creator)
creator
- Creator method; no-arguments constructor or static factory
method.public void addStringCreator(AnnotatedWithParams creator, boolean explicit)
public void addIntCreator(AnnotatedWithParams creator, boolean explicit)
public void addLongCreator(AnnotatedWithParams creator, boolean explicit)
public void addBigIntegerCreator(AnnotatedWithParams creator, boolean explicit)
public void addDoubleCreator(AnnotatedWithParams creator, boolean explicit)
public void addBigDecimalCreator(AnnotatedWithParams creator, boolean explicit)
public void addBooleanCreator(AnnotatedWithParams creator, boolean explicit)
public void addDelegatingCreator(AnnotatedWithParams creator, boolean explicit, SettableBeanProperty[] injectables, int delegateeIndex)
public void addPropertyCreator(AnnotatedWithParams creator, boolean explicit, SettableBeanProperty[] properties)
public boolean hasDefaultCreator()
public boolean hasDelegatingCreator()
public boolean hasPropertyBasedCreator()
protected boolean verifyNonDup(AnnotatedWithParams newOne, int typeIndex, boolean explicit)
protected void _reportDuplicateCreator(int typeIndex, boolean explicit, AnnotatedWithParams oldOne, AnnotatedWithParams newOne)
protected boolean _isEnumValueOf(AnnotatedWithParams creator)
Copyright © 2008–2023 FasterXML. All rights reserved.