public class BoonExpressionContext extends Object implements ExpressionContext
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,MethodAccess> |
staticMethodMap
Functions can be used anywhere where expressions can be used.
|
| Constructor and Description |
|---|
BoonExpressionContext(List<Object> root) |
BoonExpressionContext(Object... array) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFunctions(Class<?> functionsClass) |
void |
addFunctions(String prefix,
Class<?> functions) |
Object |
get(Object key) |
protected List<Object> |
getObjectFromArguments(String arguments,
boolean searchChildren) |
<T> T |
idx(Class<T> type,
String property) |
Object |
idx(String property) |
byte |
idxByte(String property) |
char |
idxChar(String property) |
double |
idxDouble(String property) |
float |
idxFloat(String property) |
int |
idxInt(String property) |
long |
idxLong(String property) |
short |
idxShort(String property) |
String |
idxString(String property) |
void |
initContext(Object... array) |
boolean |
isEmpty() |
Object |
lookup(String objectName)
Lookup an object and use its name as the default value if not found.
|
Object |
lookupWithDefault(String objectExpression,
Object defaultValue) |
void |
pushContext(Object value) |
void |
put(String key,
Object value) |
void |
removeLastContext() |
int |
size() |
protected Map<String,MethodAccess> staticMethodMap
public BoonExpressionContext(Object... array)
public void addFunctions(String prefix, Class<?> functions)
addFunctions in interface ExpressionContextpublic void initContext(Object... array)
initContext in interface ExpressionContextpublic void addFunctions(Class<?> functionsClass)
addFunctions in interface ExpressionContextpublic char idxChar(String property)
idxChar in interface ExpressionContextpublic byte idxByte(String property)
idxByte in interface ExpressionContextpublic short idxShort(String property)
idxShort in interface ExpressionContextpublic String idxString(String property)
idxString in interface ExpressionContextpublic int idxInt(String property)
idxInt in interface ExpressionContextpublic float idxFloat(String property)
idxFloat in interface ExpressionContextpublic double idxDouble(String property)
idxDouble in interface ExpressionContextpublic long idxLong(String property)
idxLong in interface ExpressionContextpublic Object idx(String property)
idx in interface ExpressionContextpublic <T> T idx(Class<T> type, String property)
idx in interface ExpressionContextpublic int size()
public boolean isEmpty()
public void put(String key, Object value)
put in interface ExpressionContextpublic Object lookup(String objectName)
lookup in interface ExpressionContextobjectName - public Object lookupWithDefault(String objectExpression, Object defaultValue)
lookupWithDefault in interface ExpressionContextprotected List<Object> getObjectFromArguments(String arguments, boolean searchChildren)
public void pushContext(Object value)
pushContext in interface ExpressionContextpublic void removeLastContext()
removeLastContext in interface ExpressionContextCopyright © 2016. All Rights Reserved.