public class PojoPathNavigatorImpl extends AbstractPojoPathNavigator
PojoPathNavigator
.AbstractPojoPathNavigator.CachingPojoPath, AbstractPojoPathNavigator.PojoPathCache, AbstractPojoPathNavigator.PojoPathState
Modifier and Type | Field and Description |
---|---|
private PojoDescriptorBuilder |
descriptorBuilder |
private PojoDescriptorBuilderFactory |
descriptorBuilderFactory |
Constructor and Description |
---|
PojoPathNavigatorImpl()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doInitialize()
This method performs the actual
initialization . |
protected PojoDescriptorBuilder |
getDescriptorBuilder()
This method gets the
PojoDescriptorBuilder used for the underlying reflectional property access. |
protected Object |
getFromPojo(AbstractPojoPathNavigator.CachingPojoPath currentPath,
PojoPathContext context,
AbstractPojoPathNavigator.PojoPathState state)
|
void |
setDescriptorBuilder(PojoDescriptorBuilder descriptorBuilder)
This method sets the
descriptor-builder to use. |
void |
setDescriptorBuilderFactory(PojoDescriptorBuilderFactory descriptorBuilderFactory) |
protected Object |
setInPojo(AbstractPojoPathNavigator.CachingPojoPath currentPath,
PojoPathContext context,
AbstractPojoPathNavigator.PojoPathState state,
Object parentPojo,
Object value)
|
convert, convertList, create, createState, createStateByType, get, get, get, getCollectionReflectionUtil, getFromFunction, getFromList, getFromMap, getFunction, getFunctionManager, getPojoFactory, getRecursive, getReflectionUtil, getType, getType, getValueConverter, pojo2Map, pojo2Map, set, set, setCollectionReflectionUtil, setFunctionManager, setInList, setPojoFactory, setReflectionUtil, setValueConverter
createLogger, getLogger
doInitialized, getInitializationState, initialize
private PojoDescriptorBuilder descriptorBuilder
private PojoDescriptorBuilderFactory descriptorBuilderFactory
public PojoPathNavigatorImpl()
AbstractComponent.initialize()
this component before it can be used.protected PojoDescriptorBuilder getDescriptorBuilder()
PojoDescriptorBuilder
used for the underlying reflectional property access.public void setDescriptorBuilder(PojoDescriptorBuilder descriptorBuilder)
descriptor-builder
to use.descriptorBuilder
- is the descriptorBuilder to use.@Inject public void setDescriptorBuilderFactory(PojoDescriptorBuilderFactory descriptorBuilderFactory)
descriptorBuilderFactory
- is the descriptorBuilderFactory to setprotected void doInitialize()
AbstractComponent
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.doInitialize
in class AbstractPojoPathNavigator
protected Object getFromPojo(AbstractPojoPathNavigator.CachingPojoPath currentPath, PojoPathContext context, AbstractPojoPathNavigator.PojoPathState state)
AbstractPojoPathNavigator
segment
of the given
currentPath
from the Pojo
given by parentPojo
. If the result is
null
and mode
is PojoPathMode.CREATE_IF_NULL
it creates and attaches (sets) the missing
object.getFromPojo
in class AbstractPojoPathNavigator
currentPath
- is the current AbstractPojoPathNavigator.CachingPojoPath
to evaluate.context
- is the context
for this operation.state
- is the state
of this operation.null
according to the mode
.protected Object setInPojo(AbstractPojoPathNavigator.CachingPojoPath currentPath, PojoPathContext context, AbstractPojoPathNavigator.PojoPathState state, Object parentPojo, Object value)
AbstractPojoPathNavigator
segment
of the given currentPath
from the
Pojo
given by parentPojo
. If the result is null
and mode
is PojoPathMode.CREATE_IF_NULL
it creates and attaches (sets) the missing object.setInPojo
in class AbstractPojoPathNavigator
currentPath
- is the current AbstractPojoPathNavigator.CachingPojoPath
to set.context
- is the context
for this operation.state
- is the state
to use.parentPojo
- is the parent Pojo
to work on.value
- is the value to set in parentPojo
.null
.Copyright © 2001–2016 mmm-Team. All rights reserved.