Package org.jppf.node.policy
Class PropertyNameExpression
java.lang.Object
org.jppf.node.policy.PropertyNameExpression
- All Implemented Interfaces:
Serializable,Expression<String>
A special type or expression that represents either the name of a property or an expression that resolves to a specified target type.
- Author:
- Laurent Cohen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyNameExpression(String propertyNameOrExpression, ValueType targetValueType) Initialize with the specified property name. -
Method Summary
Modifier and TypeMethodDescriptionevaluate(PropertiesCollection<String> properties) Evaluate this expression against a set of properties.boolean
-
Constructor Details
-
PropertyNameExpression
Initialize with the specified property name.- Parameters:
propertyNameOrExpression- the name of a property as a literal.targetValueType- the type of value for the property whose name is specfied in this expression.
-
-
Method Details
-
evaluate
Description copied from interface:ExpressionEvaluate this expression against a set of properties.- Specified by:
evaluatein interfaceExpression<String>- Parameters:
properties- against which to evaluate.- Returns:
- the expression result.
-
getExpression
- Specified by:
getExpressionin interfaceExpression<String>- Returns:
- the string representing the expression.
-
isLiteral
public boolean isLiteral()- Specified by:
isLiteralin interfaceExpression<String>- Returns:
- whether this expression is a literal value.
-
getValueType
- Specified by:
getValueTypein interfaceExpression<String>- Returns:
- the type of value this expression returns.
-
getTargetValueType
- Returns:
- the type of value for the property whose name is specfied in this expression.
-