public class BasicAttributeEvaluatorFactory extends Object implements AttributeEvaluatorFactory
AttributeEvaluatorFactory
. It supports a
default attribute evaluator, in case the language is not recognized.Constructor and Description |
---|
BasicAttributeEvaluatorFactory(AttributeEvaluator defaultEvaluator)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
AttributeEvaluator |
getAttributeEvaluator(Attribute attribute)
Creates and attribute evaluator using an attribute.
|
AttributeEvaluator |
getAttributeEvaluator(String language)
Creates and attribute evaluator for the given expression language.
|
void |
registerAttributeEvaluator(String language,
AttributeEvaluator evaluator)
Registers a known expression language with its attribute evaluator.
|
public BasicAttributeEvaluatorFactory(AttributeEvaluator defaultEvaluator)
defaultEvaluator
- The default evaluator to return if it is not
found in the map of known languages.public void registerAttributeEvaluator(String language, AttributeEvaluator evaluator)
language
- The name of the expression language.evaluator
- The associated attribute evaluator.public AttributeEvaluator getAttributeEvaluator(String language)
getAttributeEvaluator
in interface AttributeEvaluatorFactory
language
- The name of the expression language.null
.public AttributeEvaluator getAttributeEvaluator(Attribute attribute)
getAttributeEvaluator
in interface AttributeEvaluatorFactory
attribute
- The attribute used to obtain the evaluator.null
.Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.