org.pm4j.core.pm.impl.pathresolver
Class PassThroughPathResolver

java.lang.Object
  extended by org.pm4j.core.pm.impl.pathresolver.PathResolverBase
      extended by org.pm4j.core.pm.impl.pathresolver.PassThroughPathResolver
All Implemented Interfaces:
PathResolver

public class PassThroughPathResolver
extends PathResolverBase

Just passes the given object back.
Used for scenarios, where the start object of the path should be used.

Does not support PathResolver.setValue(Object, Object).

Author:
olaf boede

Field Summary
static PassThroughPathResolver INSTANCE
          It's an immutable algorithm.
 
Constructor Summary
PassThroughPathResolver()
           
 
Method Summary
 java.lang.Object getValue(java.lang.Object startObj)
           
 java.lang.Object getValue(java.lang.Object pmParent, java.lang.Object startObj)
           
 void setValue(java.lang.Object startObj, java.lang.Object value)
           
 java.lang.String toString()
           
 
Methods inherited from class org.pm4j.core.pm.impl.pathresolver.PathResolverBase
isNullAllowed, setNullAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final PassThroughPathResolver INSTANCE
It's an immutable algorithm. It may be used as a singleton.

Constructor Detail

PassThroughPathResolver

public PassThroughPathResolver()
Method Detail

getValue

public java.lang.Object getValue(java.lang.Object startObj)
Parameters:
startObj - The object to start the navigation from.
Returns:
The found value according to the path specification.

getValue

public java.lang.Object getValue(java.lang.Object pmParent,
                                 java.lang.Object startObj)
Parameters:
pmParent - The instance, used to create the execution context from.
Usually used to provide access to variables.
startObj - The instance to start the evaluation from.
Returns:
The evaluation result.

setValue

public void setValue(java.lang.Object startObj,
                     java.lang.Object value)
Parameters:
startObj - The object to start the navigation from.
value - The value to set to the field, addressed by the path.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object