|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VariableResolver<V>
Resolves variables to its value, while encapsulating how that resolution happens.
Nested Class Summary | |
---|---|
static class |
VariableResolver.ByMap<V>
VariableResolver backed by a Map . |
static class |
VariableResolver.Union<V>
Union of multiple VariableResolver . |
Field Summary | |
---|---|
static VariableResolver |
NONE
Empty resolver that always returns null. |
Method Summary | |
---|---|
V |
resolve(String name)
Receives a variable name and obtains the value associated with the name. |
Field Detail |
---|
static final VariableResolver NONE
Method Detail |
---|
V resolve(String name)
This can be implemented simply on top of a VariableResolver.ByMap
(see VariableResolver.ByMap
), or
this can be used like an expression evaluator.
name
- Name of the variable to be resolved.
Never null, never empty. The name shouldn't include the syntactic
marker of an expression. IOW, it should be "foo" but not "${foo}".
A part of the goal of this design is to abstract away the expression
marker syntax.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |