Interface Expression<E>

Type Parameters:
E - the type of results returned by the expression.
All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractExpression, BooleanExpression, NumericExpression, PropertyNameExpression, StringExpression

public interface Expression<E> extends Serializable
Interface for values that can be represented as either literals or expressions similar to the values of JPPF configuration properties that include property substituions and/or scripted expressions. Property substitutions are in the form ${property_name}, whereas scripted expressions are in the form $script:language:source_type{script_inline_or_location}$.

In the case of execution policies, substituted values and scripted expressions apply to a PropertiesCollection instead of a single TypedProperties object.

Scripted expressions have a predefined variable named "jppfSystemInfo" which references a JPPFSystemInformation object.

Author:
Laurent Cohen
See Also:
  • Method Details

    • evaluate

      E evaluate(PropertiesCollection<String> properties)
      Evaluate this expression against a set of properties.
      Parameters:
      properties - against which to evaluate.
      Returns:
      the expression result.
    • getExpression

      String getExpression()
      Returns:
      the string representing the expression.
    • isLiteral

      boolean isLiteral()
      Returns:
      whether this expression is a literal value.
    • getValueType

      ValueType getValueType()
      Returns:
      the type of value this expression returns.