Class NewInstanceOperatorExpression
java.lang.Object
com.espertech.esper.common.client.soda.ExpressionBase
com.espertech.esper.common.client.soda.NewInstanceOperatorExpression
- All Implemented Interfaces:
Expression
,Serializable
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 Summary
ConstructorDescriptionCtor.NewInstanceOperatorExpression
(String className) Ctor.NewInstanceOperatorExpression
(String className, int numArrayDimensions) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the class name.int
Returns the array dimension, with child nodes providing either dimensions or array initialization valuesReturns precedence.void
setClassName
(String className) Sets the class name.void
setNumArrayDimensions
(int numArrayDimensions) Sets the array dimension, with child nodes providing either dimensions or array initialization valuesvoid
toPrecedenceFreeEPL
(StringWriter writer) Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.Methods inherited from class com.espertech.esper.common.client.soda.ExpressionBase
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
-
Constructor Details
-
NewInstanceOperatorExpression
public NewInstanceOperatorExpression()Ctor. -
NewInstanceOperatorExpression
Ctor.- Parameters:
className
- the class name
-
NewInstanceOperatorExpression
Ctor.- Parameters:
className
- the class namenumArrayDimensions
- for array initialization set a dimension value greater zero
-
-
Method Details
-
getClassName
Returns the class name.- Returns:
- class name
-
setClassName
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
Description copied from interface:Expression
Returns precedence.- Returns:
- precedence
-
toPrecedenceFreeEPL
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 classExpressionBase
- Parameters:
writer
- is the output to use
-