|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object consciouscode.seedling.config.properties.PropertiesConfigEvaluator
public class PropertiesConfigEvaluator
Evaluates the content of .properties
configuration files.
The given ConfigEvaluatorContext
has a precondition that the
result of ConfigEvaluatorContext.getConfigResource()
returns a
PropertiesConfigResource
.
Field Summary | |
---|---|
static String |
DOT_CHILDREN_PROP
|
static String |
DOT_THIS_PROP
|
static char |
DOUBLE_QUOTE_CHAR
|
static String |
DOUBLE_QUOTE_STRING
|
protected boolean |
isTransitional
Indicates if this evaluator allows backwards-compatible expressions. |
Fields inherited from interface consciouscode.seedling.config.ConfigEvaluator |
---|
NO_VALUE |
Constructor Summary | |
---|---|
PropertiesConfigEvaluator()
|
|
PropertiesConfigEvaluator(ClassLoader nodeClassLoader)
|
Method Summary | |
---|---|
Object |
constructNode(ConstructionContext context)
Creates a new node, ready for injection and decoration. |
static String |
describeToken(StreamTokenizer tokenizer)
|
EvaluationResult |
evalNextExpression(consciouscode.seedling.config.properties.EvaluationContext context,
consciouscode.seedling.config.properties.Tokenizer tokenizer)
|
Object |
evaluateProperty(PropertyEvaluationContext context,
String property,
Class<?> propertyType)
Evaluates the configuration of a property. |
ConfigResource |
getInnerConfig(ConfigResource config,
Iterable<String> pathParts)
|
boolean |
isTransitional()
|
void |
setTransitional(boolean transitional)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DOT_THIS_PROP
public static final String DOT_CHILDREN_PROP
public static final char DOUBLE_QUOTE_CHAR
public static final String DOUBLE_QUOTE_STRING
protected boolean isTransitional
Constructor Detail |
---|
public PropertiesConfigEvaluator()
public PropertiesConfigEvaluator(ClassLoader nodeClassLoader)
Method Detail |
---|
public boolean isTransitional()
public void setTransitional(boolean transitional)
public ConfigResource getInnerConfig(ConfigResource config, Iterable<String> pathParts) throws ConfigurationException
getInnerConfig
in interface ConfigEvaluator
ConfigurationException
public Object constructNode(ConstructionContext context) throws NodeProvisioningException
ConfigEvaluator
If the evaluator cannot construct the new node, implementations may
delegate to super-configuration resources via
ConstructionContext.superConstructNode()
. If it does so, this
method should not return null, since that causes the framework to do the
delegation again.
To provision an alias, this method should return a NodeReference
to the target node.
constructNode
in interface ConfigEvaluator
null
if there's no creation configured in this layer,
or ConfigEvaluator.NO_VALUE
if creation is explicitly
disabled.
NodeProvisioningException
public Object evaluateProperty(PropertyEvaluationContext context, String property, Class<?> propertyType) throws PropertyEvaluationException
ConfigEvaluator
PropertyEvaluationContext.superEvaluateProperty(java.lang.String, java.lang.Class>)
.
evaluateProperty
in interface ConfigEvaluator
ConfigEvaluator.NO_VALUE
if there's no result.
PropertyEvaluationException
- if anything goes wrong while
evaluating the property.public EvaluationResult evalNextExpression(consciouscode.seedling.config.properties.EvaluationContext context, consciouscode.seedling.config.properties.Tokenizer tokenizer) throws SyntaxException, EvaluationException
null
if the expression has no value.
For example, 'super' with no inherited configuration.
SyntaxException
EvaluationException
public static String describeToken(StreamTokenizer tokenizer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |