Class PropertyNameExpression

java.lang.Object
org.jppf.node.policy.PropertyNameExpression
All Implemented Interfaces:
Serializable, Expression<String>

public class PropertyNameExpression extends Object implements 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 Details

    • PropertyNameExpression

      public PropertyNameExpression(String propertyNameOrExpression, ValueType targetValueType)
      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

      public String evaluate(PropertiesCollection<String> properties)
      Description copied from interface: Expression
      Evaluate this expression against a set of properties.
      Specified by:
      evaluate in interface Expression<String>
      Parameters:
      properties - against which to evaluate.
      Returns:
      the expression result.
    • getExpression

      public String getExpression()
      Specified by:
      getExpression in interface Expression<String>
      Returns:
      the string representing the expression.
    • isLiteral

      public boolean isLiteral()
      Specified by:
      isLiteral in interface Expression<String>
      Returns:
      whether this expression is a literal value.
    • getValueType

      public ValueType getValueType()
      Specified by:
      getValueType in interface Expression<String>
      Returns:
      the type of value this expression returns.
    • getTargetValueType

      public ValueType getTargetValueType()
      Returns:
      the type of value for the property whose name is specfied in this expression.