net.sourceforge.stripes.util.bean
Interface PropertyAccessor<T>

All Known Implementing Classes:
ArrayPropertyAccessor, JavaBeanPropertyAccessor, ListPropertyAccessor, MapPropertyAccessor

public interface PropertyAccessor<T>

Interface which is implemented by classes capable of acting as accessors for certain types of classes. Currently this is tied very tightly to the NodeType enum. Each PropertyAccessor must be able to store and retrieve values from the target type.

Since:
Stripes 1.4
Author:
Tim Fennell

Method Summary
 Object getValue(NodeEvaluation evaluation, T target)
          Gets the value specified by the NodeEvaluation in the target object.
 void setValue(NodeEvaluation evaluation, T target, Object value)
          Gets the value specified by the NodeEvaluation in the target object.
 

Method Detail

getValue

Object getValue(NodeEvaluation evaluation,
                T target)
Gets the value specified by the NodeEvaluation in the target object.

Parameters:
evaluation - provides access to the name and type of the desired property as well as to prior and subsequent nodes in the expression
target - the target object from which the value is to be retrieved
Returns:
the value as determined by the accessor, may be null

setValue

void setValue(NodeEvaluation evaluation,
              T target,
              Object value)
Gets the value specified by the NodeEvaluation in the target object.

Parameters:
evaluation - provides access to the name and type of the desired property as well as to prior and subsequent nodes in the expression
target - the target object in/on to which the value is to be stored
value - the value to be set, may be null


? Copyright 2005-2006, Stripes Development Team.