Class NewInstanceOperatorExpression

java.lang.Object
com.espertech.esper.common.client.soda.ExpressionBase
com.espertech.esper.common.client.soda.NewInstanceOperatorExpression
All Implemented Interfaces:
Expression, Serializable

public class NewInstanceOperatorExpression extends ExpressionBase
The "new instance" operator instantiates a host language object.

Set a array dimension value greater zero for new array. If the child node is a single ArrayExpression, the expression is "new array[] {...}". If the child node is not a single ArrayExpression, the expression is "new array[...][...]". For 2-dimensionnal array initialization, put ArrayExpression inside ArrayExpression, i.e. the expression is "new array[] {{...}, {...}}".

See Also:
  • Constructor Details

    • NewInstanceOperatorExpression

      public NewInstanceOperatorExpression()
      Ctor.
    • NewInstanceOperatorExpression

      public NewInstanceOperatorExpression(String className)
      Ctor.
      Parameters:
      className - the class name
    • NewInstanceOperatorExpression

      public NewInstanceOperatorExpression(String className, int numArrayDimensions)
      Ctor.
      Parameters:
      className - the class name
      numArrayDimensions - for array initialization set a dimension value greater zero
  • Method Details

    • getClassName

      public String getClassName()
      Returns the class name.
      Returns:
      class name
    • setClassName

      public void setClassName(String className)
      Sets the class name.
      Parameters:
      className - class name to set
    • getNumArrayDimensions

      public int getNumArrayDimensions()
      Returns the array dimension, with child nodes providing either dimensions or array initialization values
      Returns:
      array dimensions, zero for not-an-array
    • setNumArrayDimensions

      public void setNumArrayDimensions(int numArrayDimensions)
      Sets the array dimension, with child nodes providing either dimensions or array initialization values
      Parameters:
      numArrayDimensions - array dimensions, zero for not-an-array
    • getPrecedence

      public ExpressionPrecedenceEnum getPrecedence()
      Description copied from interface: Expression
      Returns precedence.
      Returns:
      precedence
    • toPrecedenceFreeEPL

      public void toPrecedenceFreeEPL(StringWriter writer)
      Description copied from class: ExpressionBase
      Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.
      Specified by:
      toPrecedenceFreeEPL in class ExpressionBase
      Parameters:
      writer - is the output to use