public abstract class Operator extends JavaNonTerminalProgramElement implements Expression, ExpressionContainer
| Modifier and Type | Field and Description | 
|---|---|
protected ImmutableArray<Expression> | 
children
Children. 
 | 
static int | 
INFIX  | 
static int | 
POSTFIX  | 
static int | 
PREFIX
Relative positioning of the operator. 
 | 
| Constructor and Description | 
|---|
Operator()  | 
Operator(Expression unaryChild)
Operator. 
 | 
Operator(Expression[] arguments)
Operator. 
 | 
Operator(Expression lhs,
        Expression rhs)
Operator. 
 | 
Operator(ExtList children)
Constructor for the transformation of COMPOST ASTs to KeY. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
ImmutableArray<Expression> | 
getArguments()
return arguments 
 | 
abstract int | 
getArity()
getArity() == getASTchildren().size() 
 | 
ProgramElement | 
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
      child array 
 | 
int | 
getChildCount()
Returns the number of children of this node. 
 | 
Expression | 
getExpressionAt(int index)  | 
int | 
getExpressionCount()
Get the number of expressions in this container. 
 | 
SourceElement | 
getFirstElement()
Finds the source element that occurs first in the source. 
 | 
SourceElement | 
getFirstElementIncludingBlocks()
Finds the source element that occurs first in the source. 
 | 
abstract KeYJavaType | 
getKeYJavaType(Services javaServ,
              ExecutionContext ec)
returns the  
KeYJavaType of an expression | 
SourceElement | 
getLastElement()
Finds the source element that occurs last in the source. 
 | 
abstract int | 
getNotation()  | 
abstract int | 
getPrecedence()
0 is the "highest" precedence (obtained by parantheses),
  13 the "lowest". 
 | 
boolean | 
isLeftAssociative()
Checks if this operator is left or right associative. 
 | 
boolean | 
isToBeParenthesized()  | 
static boolean | 
precedes(Operator a,
        Operator b)  | 
java.lang.String | 
reuseSignature(Services services,
              ExecutionContext ec)
overriden from JavaProgramElement. 
 | 
compatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrint, prettyPrintMaingetEndPosition, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComments, matchequalsModRenaming, getEndPosition, getPositionInfo, getRelativePosition, getStartPosition, prettyPrint, visitprotected final ImmutableArray<Expression> children
public static final int PREFIX
public static final int INFIX
public static final int POSTFIX
public Operator()
public Operator(Expression lhs, Expression rhs)
lhs - an expression.rhs - an expression.public Operator(ExtList children)
children - the children of this AST element as KeY classes.
 In this case the order of the children is IMPORTANT. 
        May contain:
                2 of Expression (the first Expression as left hand
                        side, the second as right hand side), 
                Commentspublic Operator(Expression unaryChild)
unaryChild - an expression.public Operator(Expression[] arguments)
arguments - an array of expression.public abstract int getArity()
public abstract int getPrecedence()
public static boolean precedes(Operator a, Operator b)
public abstract int getNotation()
public boolean isLeftAssociative()
true, if the operator is left associative,
   false otherwise.public SourceElement getFirstElement()
JavaSourceElementgetFirstElement in interface SourceElementgetFirstElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getStartPosition()public SourceElement getFirstElementIncludingBlocks()
SourceElementgetFirstElementIncludingBlocks in interface SourceElementgetFirstElementIncludingBlocks in class JavaSourceElementSourceElement.getStartPosition()public SourceElement getLastElement()
JavaSourceElementgetLastElement in interface SourceElementgetLastElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getEndPosition()public int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
                 of boundspublic int getExpressionCount()
getExpressionCount in interface ExpressionContainerpublic Expression getExpressionAt(int index)
getExpressionAt in interface ExpressionContainerpublic ImmutableArray<Expression> getArguments()
public boolean isToBeParenthesized()
public java.lang.String reuseSignature(Services services, ExecutionContext ec)
reuseSignature in class JavaProgramElementec - TODOpublic abstract KeYJavaType getKeYJavaType(Services javaServ, ExecutionContext ec)
ExpressionKeYJavaType of an expressiongetKeYJavaType in interface Expression