net.sf.mmm.util.pojo.path.impl
Class PojoPathNavigatorImpl
java.lang.Object
net.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.pojo.path.base.AbstractPojoPathNavigator
net.sf.mmm.util.pojo.path.impl.PojoPathNavigatorImpl
- All Implemented Interfaces:
- PojoPathNavigator
@Singleton
@Named
public class PojoPathNavigatorImpl
- extends AbstractPojoPathNavigator
This is the implementation of the
PojoPathNavigator interface.
- Since:
- 1.1.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
| Methods inherited from class net.sf.mmm.util.pojo.path.base.AbstractPojoPathNavigator |
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
descriptorBuilder
private PojoDescriptorBuilder descriptorBuilder
- See Also:
getDescriptorBuilder()
descriptorBuilderFactory
private PojoDescriptorBuilderFactory descriptorBuilderFactory
- See Also:
setDescriptorBuilderFactory(PojoDescriptorBuilderFactory)
PojoPathNavigatorImpl
public PojoPathNavigatorImpl()
- The constructor.
ATTENTION:
You need to AbstractComponent.initialize() this component before it can be used.
getDescriptorBuilder
protected PojoDescriptorBuilder getDescriptorBuilder()
- This method gets the
PojoDescriptorBuilder used for the underlying
reflectional property access.
- Returns:
- the descriptorBuilder
setDescriptorBuilder
public void setDescriptorBuilder(PojoDescriptorBuilder descriptorBuilder)
- This method sets the
descriptor-builder to
use.
- Parameters:
descriptorBuilder - is the descriptorBuilder to use.
setDescriptorBuilderFactory
@Inject
public void setDescriptorBuilderFactory(PojoDescriptorBuilderFactory descriptorBuilderFactory)
- Parameters:
descriptorBuilderFactory - is the descriptorBuilderFactory to set
doInitialize
protected void doInitialize()
- This method performs the actual
initialization. It is
called when AbstractComponent.initialize() is invoked for the first time.
ATTENTION:
When you override this method from a sub-class you need to do a
super.AbstractComponent.doInitialize().
- Overrides:
doInitialize in class AbstractPojoPathNavigator
getFromPojo
protected Object getFromPojo(AbstractPojoPathNavigator.CachingPojoPath currentPath,
PojoPathContext context,
AbstractPojoPathNavigator.PojoPathState state)
- This method reflectively gets the single
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.
- Specified by:
getFromPojo in class AbstractPojoPathNavigator
- Parameters:
currentPath - is the current AbstractPojoPathNavigator.CachingPojoPath to evaluate.context - is the context for this operation.state - is the
state of this operation.
- Returns:
- the result of the evaluation. It might be
null
according to the mode.
setInPojo
protected Object setInPojo(AbstractPojoPathNavigator.CachingPojoPath currentPath,
PojoPathContext context,
AbstractPojoPathNavigator.PojoPathState state,
Object parentPojo,
Object value)
- This method sets the single
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.
- Specified by:
setInPojo in class AbstractPojoPathNavigator
- Parameters:
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.
- Returns:
- the replaced value. It may be
null.
Copyright © 2001-2010 mmm-Team. All Rights Reserved.