net.sf.mmm.util.pojo.path.base
Class AbstractPojoPathNavigator.CachingPojoPath

java.lang.Object
  extended by net.sf.mmm.util.pojo.path.base.BasicPojoPath
      extended by net.sf.mmm.util.pojo.path.base.AbstractPojoPathNavigator.CachingPojoPath
All Implemented Interfaces:
PojoPath
Enclosing class:
AbstractPojoPathNavigator

protected static class AbstractPojoPathNavigator.CachingPojoPath
extends BasicPojoPath

This class represents a PojoPath. It contains the internal logic to validate and parse the PojoPath. Additional it can also hold the result of the evaluation and the generic type.

Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  AbstractPojoPathNavigator.CachingPojoPath parent
           
private  Object pojo
           
private  Class<?> pojoClass
           
private  GenericType<?> pojoType
           
 
Fields inherited from interface net.sf.mmm.util.pojo.path.api.PojoPath
SEPARATOR
 
Constructor Summary
AbstractPojoPathNavigator.CachingPojoPath(Object pojo, Class<?> pojoClass)
          The constructor for the root-path.
AbstractPojoPathNavigator.CachingPojoPath(Object pojo, Class<?> pojoClass, GenericType<?> pojoType)
          The constructor for the root-path.
AbstractPojoPathNavigator.CachingPojoPath(String pojoPath)
          The constructor.
 
Method Summary
 AbstractPojoPathNavigator.CachingPojoPath getParent()
           
 Object getPojo()
          This method gets the Pojo instance this PojoPath is leading to.
 Class<?> getPojoClass()
          This method get the Class of the Pojo this PojoPath is leading to.
 GenericType<?> getPojoType()
          This method gets the type of the Pojo this PojoPath is leading to.
 void setParent(AbstractPojoPathNavigator.CachingPojoPath parent)
           
 void setPojo(Object pojo)
          This method sets the pojo-instance.
 void setPojoClass(Class<?> pojoClass)
          This method sets the pojo-class.
 void setPojoType(GenericType<?> pojoType)
          This method sets the pojo-type.
 
Methods inherited from class net.sf.mmm.util.pojo.path.base.BasicPojoPath
getFunction, getIndex, getParentPath, getPojoPath, getSegment, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

private AbstractPojoPathNavigator.CachingPojoPath parent
See Also:
getParent()

pojoType

private GenericType<?> pojoType
See Also:
getPojoType()

pojoClass

private Class<?> pojoClass
See Also:
getPojoClass()

pojo

private Object pojo
See Also:
getPojo()
Constructor Detail

AbstractPojoPathNavigator.CachingPojoPath

public AbstractPojoPathNavigator.CachingPojoPath(String pojoPath)
The constructor.

Parameters:
pojoPath - is the path to represent.

AbstractPojoPathNavigator.CachingPojoPath

public AbstractPojoPathNavigator.CachingPojoPath(Object pojo,
                                                 Class<?> pojoClass)
The constructor for the root-path.

Parameters:
pojo - is the initial pojo. It may be null if invoked via getType.
pojoClass - is the initial pojo-class.

AbstractPojoPathNavigator.CachingPojoPath

public AbstractPojoPathNavigator.CachingPojoPath(Object pojo,
                                                 Class<?> pojoClass,
                                                 GenericType<?> pojoType)
The constructor for the root-path.

Parameters:
pojo - is the initial pojo. It may be null if invoked via getType.
pojoClass - is the initial pojo-class.
pojoType - is the initial pojo-type.
Method Detail

getParent

public AbstractPojoPathNavigator.CachingPojoPath getParent()
Returns:
the parent

setParent

public void setParent(AbstractPojoPathNavigator.CachingPojoPath parent)
Parameters:
parent - is the parent to set

getPojoType

public GenericType<?> getPojoType()
This method gets the type of the Pojo this PojoPath is leading to.

Returns:
the pojo-type or null if NOT set.

setPojoType

public void setPojoType(GenericType<?> pojoType)
This method sets the pojo-type.

Parameters:
pojoType - is the pojo-type to set.

getPojoClass

public Class<?> getPojoClass()
This method get the Class of the Pojo this PojoPath is leading to.

Returns:
the pojo-class or null if NOT set.

setPojoClass

public void setPojoClass(Class<?> pojoClass)
This method sets the pojo-class.

Parameters:
pojoClass - is the pojo-class to set.

getPojo

public Object getPojo()
This method gets the Pojo instance this PojoPath is leading to.

Returns:
the Pojo or null.

setPojo

public void setPojo(Object pojo)
This method sets the pojo-instance.

Parameters:
pojo - is the pojo-instance.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.