Class JExprMath
java.lang.Object
com.inductiveautomation.snap.javatree.JNode
com.inductiveautomation.snap.javatree.JExpr
com.inductiveautomation.snap.javatree.JExprMath
An class to represent expressions that include an operator (math, logical, etc.).
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.inductiveautomation.snap.javatree.JExpr
JExpr.AllocationExpr, JExpr.ArrayIndexExpr, JExpr.CastExpr -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new expression.JExprMath(JExprMath.Op anOp, JExpr aFirst) Creates a new expression for given op and LeftHand expression.JExprMath(JExprMath.Op anOp, JExpr aFirst, JExpr aSecond) Creates a new expression for given op and LeftHand/RightHand expressions. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdd operands to children.protected StringReturns the class name for expression.Returns the part name.getOp()Returns the op.getOperand(int anIndex) Returns the specified operand.intReturns the operand count.voidsetOperand(JExpr anExpr, int anIndex) Sets the specified operand.Methods inherited from class com.inductiveautomation.snap.javatree.JExpr
getParentClassRef, getParentExprMethods inherited from class com.inductiveautomation.snap.javatree.JNode
addChild, getBlock, getChild, getChildCount, getChildren, getClassLoader, getClassName, getClassRef, getClassRefImpl, getEnclosingClassDecl, getEnclosingMemberDecl, getEnclosingMethodDecl, getEnd, getEndToken, getFile, getJClass, getLineIndex, getName, getNameImpl, getNodeAtCharIndex, getNodeFields, getNodeFieldsImpl, getNodeParents, getNodePath, getOthers, getParent, getParent, getReferencedClasses, getReferencedClassNames, getReferencedClassNames, getReferencedClassNames, getStart, getStartToken, getString, getVariableDecl, getVariableDeclInside, getVariableDecls, isBlock, setClassName, setClassRef, setEndToken, setJClass, setParent, setStartToken, toString
-
Field Details
-
op
-
-
Constructor Details
-
JExprMath
public JExprMath()Creates a new expression. -
JExprMath
Creates a new expression for given op and LeftHand expression. -
JExprMath
Creates a new expression for given op and LeftHand/RightHand expressions.
-
-
Method Details
-
getOp
Returns the op. -
getOperandCount
public int getOperandCount()Returns the operand count. -
getOperand
Returns the specified operand. -
setOperand
Sets the specified operand. -
getClassNameImpl
Returns the class name for expression.- Overrides:
getClassNameImplin classJNode
-
getNodeString
Returns the part name.- Overrides:
getNodeStringin classJNode
-
buildChildren
protected void buildChildren()Add operands to children.- Overrides:
buildChildrenin classJNode
-