public interface ValueStack
| Modifier and Type | Field and Description | 
|---|---|
static String | 
REPORT_ERRORS_ON_NO_PROP  | 
static String | 
VALUE_STACK  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
findString(String expr)  | 
String | 
findString(String expr,
          boolean throwExceptionOnFailure)  | 
Object | 
findValue(String expr)
Find a value by evaluating the given expression against the stack in the default search order. 
 | 
Object | 
findValue(String expr,
         boolean throwExceptionOnFailure)  | 
Object | 
findValue(String expr,
         Class asType)
Find a value by evaluating the given expression against the stack in the default search order. 
 | 
Object | 
findValue(String expr,
         Class asType,
         boolean throwExceptionOnFailure)  | 
Map<String,Object> | 
getContext()
Gets the context for this value stack. 
 | 
Map<Object,Object> | 
getExprOverrides()
Gets the override map if anyone exists. 
 | 
CompoundRoot | 
getRoot()
Get the CompoundRoot which holds the objects pushed onto the stack 
 | 
Object | 
peek()
Get the object on the top of the stack without changing the stack. 
 | 
Object | 
pop()
Get the object on the top of the stack and remove it from the stack. 
 | 
void | 
push(Object o)
Put this object onto the top of the stack 
 | 
void | 
set(String key,
   Object o)
Sets an object on the stack with the given key
 so it is retrievable by  
findValue(String), findValue(String, Class) | 
void | 
setDefaultType(Class defaultType)
Sets the default type to convert to if no type is provided when getting a value. 
 | 
void | 
setExprOverrides(Map<Object,Object> overrides)
Set a override map containing  
key -> values that takes precedent when doing find operations on the ValueStack. | 
void | 
setParameter(String expr,
            Object value)
Attempts to set a property on a bean in the stack with the given expression using the default search order. 
 | 
void | 
setValue(String expr,
        Object value)
Attempts to set a property on a bean in the stack with the given expression using the default search order. 
 | 
void | 
setValue(String expr,
        Object value,
        boolean throwExceptionOnFailure)
Attempts to set a property on a bean in the stack with the given expression using the default search order. 
 | 
int | 
size()
Get the number of objects in the stack 
 | 
static final String VALUE_STACK
static final String REPORT_ERRORS_ON_NO_PROP
Map<String,Object> getContext()
void setDefaultType(Class defaultType)
defaultType - the new default typevoid setExprOverrides(Map<Object,Object> overrides)
key -> values that takes precedent when doing find operations on the ValueStack.
 
 See the unit test for ValueStackTest for examples.overrides - overrides map.Map<Object,Object> getExprOverrides()
CompoundRoot getRoot()
void setValue(String expr, Object value)
expr - the expression defining the path to the property to be set.value - the value to be set into the named propertyvoid setParameter(String expr, Object value)
expr - the expression defining the path to the property to be set.value - the value to be set into the named propertyvoid setValue(String expr, Object value, boolean throwExceptionOnFailure)
expr - the expression defining the path to the property to be set.value - the value to be set into the named propertythrowExceptionOnFailure - a flag to tell whether an exception should be thrown if there is no property with
                                the given name.Object findValue(String expr)
expr - the expression giving the path of properties to navigate to find the property value to returnObject findValue(String expr, Class asType)
expr - the expression giving the path of properties to navigate to find the property value to returnasType - the type to convert the return value toObject peek()
CompoundRoot.peek()Object pop()
CompoundRoot.pop()void push(Object o)
o - the object to be pushed onto the stackCompoundRoot.push(Object)void set(String key, Object o)
findValue(String), findValue(String, Class)key - the keyo - the objectint size()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.