public class OperatorDescriptor
extends java.lang.Object
Note that an operator may have a fixed number of operands, a variable number of operands or both.
If the operator being described supports only a fixed number of operands, then the getFixedOperandDescriptors() method should return an array of OperandDescriptor objects (one for each required operand in the corresponding position) and the getVariableOperandDescriptor() should return null.
If the operator being described supports only a variable-number of operands, then the getFixedOperandDescriptors() method should return null or empty-array and the getVariableOperandDescriptor() should return a single descriptor describing all operands including the min/max count.
If the operator being described supports both a fixed number of operands and a variable number of operands, then both methods should return descriptors. Such operators always expect the fixed-number operands before the variable number operands when considering the order of the operands presented at evaluation time.
If the operator being described doesn't require any operands, then the getFixedOperandDescriptors() method should return null or empty-array and the getVariableOperandDescriptor() should return null.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CNAME |
Constructor and Description |
---|
OperatorDescriptor(java.lang.String name,
java.lang.String displayName,
java.lang.String type,
java.lang.String desc,
OperandDescriptor[] fixedOperands,
VariableOperandDescriptor variableOperands)
Constructs an OperandDescriptor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Retrieves the operator description.
|
java.lang.String |
getDisplayName()
Retrieves the operator display name.
|
OperandDescriptor[] |
getFixedOperandDescriptors()
Retrieves the fixed-number operand descriptors.
|
java.lang.String |
getName()
Retrieves the operator name.
|
java.lang.String |
getType()
Retrieves the operator return type.
|
VariableOperandDescriptor |
getVariableOperandDescriptor()
Retrieves the variable-number operand descriptor.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
public OperatorDescriptor(java.lang.String name, java.lang.String displayName, java.lang.String type, java.lang.String desc, OperandDescriptor[] fixedOperands, VariableOperandDescriptor variableOperands)
name
- the name of the operanddisplayName
- the displayName of the operandtype
- the fully quallified classname of the operand's typedesc
- a description of the operand's purposefixedOperands
- an array of descriptors describing the
fixed-number operands. May be null or empty array
to indicate no fixed-number operands.variableOperands
- a single descriptor describing all variable-number
operands. May be null to indicate no variable-number operands.java.lang.IllegalArgumentException
- if either name, type, or desc are nullpublic java.lang.String getName()
public java.lang.String getDisplayName()
public java.lang.String getType()
public java.lang.String getDescription()
public OperandDescriptor[] getFixedOperandDescriptors()
public VariableOperandDescriptor getVariableOperandDescriptor()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000-2019 TIBCO Inc. All Rights Reserved.