|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectast.ASTNode
ast.Expr
ast.UnaryExpr
ast.UnaryNegExpr
public class UnaryNegExpr
The UnaryNegExpr class represents arithmetic negation ('-') expressions. It extends unary expressions so it contains an expression. Since this class is similar to other subclasses most of the functionality can be implemented in the visitor method for the parent class.
ASTNode
,
Expr
Field Summary |
---|
Fields inherited from class ast.UnaryExpr |
---|
expr |
Fields inherited from class ast.ASTNode |
---|
charNum, lineNum, lineStr |
Constructor Summary | |
---|---|
UnaryNegExpr(int lineNum,
Expr expr)
UnaryNegExpr constructor |
Method Summary | |
---|---|
java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
Visitor method |
java.lang.String |
getOperandType()
Get the operand type |
java.lang.String |
getOpName()
Get the operation name |
java.lang.String |
getOpType()
Get the operation type |
boolean |
isPostfix()
Is this a postfix operator (as opposed to prefix)? |
Methods inherited from class ast.UnaryExpr |
---|
getExpr |
Methods inherited from class ast.Expr |
---|
getExprType, setExprType |
Methods inherited from class ast.ASTNode |
---|
getLineNum |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnaryNegExpr(int lineNum, Expr expr)
lineNum
- source line number corresponding to this AST nodeexpr
- expression for complementingMethod Detail |
---|
public java.lang.String getOpName()
getOpName
in class UnaryExpr
public java.lang.String getOpType()
getOpType
in class UnaryExpr
public java.lang.String getOperandType()
getOperandType
in class UnaryExpr
public boolean isPostfix()
isPostfix
in class UnaryExpr
public java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
accept
in class UnaryExpr
v
- visitor objecto
- object to pass down
Visitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |