public class CreateVariableClause extends Object implements Serializable
Constructor and Description |
---|
CreateVariableClause()
Ctor.
|
CreateVariableClause(String variableName)
Ctor.
|
CreateVariableClause(String variableType,
String variableName,
Expression optionalAssignment,
boolean constant)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
static CreateVariableClause |
create(String variableType,
String variableName)
Creates a create-variable syntax for declaring a variable.
|
static CreateVariableClause |
create(String variableType,
String variableName,
Expression expression)
Creates a create-variable syntax for declaring a variable.
|
Expression |
getOptionalAssignment()
Returns the optional assignment expression, or null to initialize to a null value
|
String |
getVariableName()
Returns the variable name.
|
String |
getVariableType()
Returns the variable type name.
|
boolean |
isArray()
Returns indictor whether array or not array.
|
boolean |
isArrayOfPrimitive()
Returns true for array of primitive values (also set the array flag)
|
boolean |
isConstant()
Returns indicator whether the variable is a constant.
|
void |
setArray(boolean array)
Sets indictor whether array or not array.
|
void |
setArrayOfPrimitive(boolean arrayOfPrimitive)
Set true for array of primitive values (also set the array flag)
|
void |
setConstant(boolean constant)
Sets the indicator whether the variable is a constant.
|
void |
setOptionalAssignment(Expression optionalAssignment)
Sets the optional assignment expression, or null to initialize to a null value
|
void |
setVariableName(String variableName)
Sets the variable name
|
void |
setVariableType(String variableType)
Sets the variable type name.
|
void |
toEPL(StringWriter writer)
Render as EPL.
|
public CreateVariableClause()
public CreateVariableClause(String variableName)
variableName
- variable namepublic CreateVariableClause(String variableType, String variableName, Expression optionalAssignment, boolean constant)
variableType
- is the variable type namevariableName
- is the name of the variableoptionalAssignment
- is the optional assignment expression supplying the initial value, or null if the
initial value is nullconstant
- true for constant, false for regular variablepublic static CreateVariableClause create(String variableType, String variableName)
variableType
- is the variable type namevariableName
- is the name of the variablepublic static CreateVariableClause create(String variableType, String variableName, Expression expression)
variableType
- is the variable type namevariableName
- is the name of the variableexpression
- is the assignment expression supplying the initial valuepublic String getVariableType()
public void setVariableType(String variableType)
variableType
- type of the variablepublic String getVariableName()
public void setVariableName(String variableName)
variableName
- name of the variablepublic Expression getOptionalAssignment()
public void setOptionalAssignment(Expression optionalAssignment)
optionalAssignment
- assignment expression, if presentpublic boolean isConstant()
public void setConstant(boolean constant)
constant
- constant falsepublic boolean isArray()
public void setArray(boolean array)
array
- array indicatorpublic boolean isArrayOfPrimitive()
public void setArrayOfPrimitive(boolean arrayOfPrimitive)
arrayOfPrimitive
- indicatorpublic void toEPL(StringWriter writer)
writer
- to output to