Class ConditionalExpression
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.graph.Node
-
- de.fraunhofer.aisec.cpg.graph.statements.Statement
-
- de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression
-
- de.fraunhofer.aisec.cpg.graph.statements.expressions.ConditionalExpression
-
- All Implemented Interfaces:
DeclarationHolder,HasType,HasType.TypeListener,Persistable,IVisitable<Node>
public class ConditionalExpression extends Expression implements HasType.TypeListener
Represents an expression containing a ternary operator: var x = condition ? valueIfTrue : valueIfFalse;
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.fraunhofer.aisec.cpg.graph.HasType
HasType.TypeListener
-
-
Field Summary
-
Fields inherited from class de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression
type
-
-
Constructor Summary
Constructors Constructor Description ConditionalExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)ExpressiongetCondition()ExpressiongetElseExpr()ExpressiongetThenExpr()inthashCode()voidpossibleSubTypesChanged(HasType src, HasType root, java.util.Set<Type> oldSubTypes)voidsetCondition(Expression condition)voidsetElseExpr(Expression elseExpr)voidsetThenExpr(Expression thenExpr)java.lang.StringtoString()voidtypeChanged(HasType src, HasType root, Type oldType)-
Methods inherited from class de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression
getPossibleSubTypes, getPropagationType, getType, getTypeListeners, refreshType, registerTypeListener, resetTypes, setPossibleSubTypes, setType, unregisterTypeListener, updatePossibleSubtypes, updateType
-
Methods inherited from class de.fraunhofer.aisec.cpg.graph.statements.Statement
addDeclaration, getLocals, getLocalsPropertyEdge, removeLocal, setLocals
-
Methods inherited from class de.fraunhofer.aisec.cpg.graph.Node
addAnnotations, addNextCFG, addNextCFG, addNextDFG, addNextEOG, addPrevDFG, addPrevEOG, addTypedef, clearNextEOG, disconnectFromGraph, getAnnotations, getArgumentIndex, getCode, getFile, getId, getLocation, getName, getNextCFG, getNextDFG, getNextEOG, getNextEOGProperties, getNextEOGPropertyEdge, getPrevDFG, getPrevEOG, getPrevEOGProperties, getTypedefs, isDummy, isImplicit, removeNextDFG, removePrevDFG, removePrevEOGEntries, removePrevEOGEntry, setArgumentIndex, setCode, setComment, setDummy, setFile, setImplicit, setLocation, setName, setNextDFG, setNextEOG, setPrevDFG, setPrevEOG, setPrevEOGProperties, setTypedefs
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.fraunhofer.aisec.cpg.graph.DeclarationHolder
addIfNotContains, addIfNotContains, addIfNotContains
-
Methods inherited from interface de.fraunhofer.aisec.cpg.graph.HasType
setPossibleSubTypes, setType
-
Methods inherited from interface de.fraunhofer.aisec.cpg.processing.IVisitable
accept
-
-
-
-
Method Detail
-
getCondition
public Expression getCondition()
-
setCondition
public void setCondition(Expression condition)
-
getThenExpr
public Expression getThenExpr()
-
setThenExpr
public void setThenExpr(Expression thenExpr)
-
getElseExpr
public Expression getElseExpr()
-
setElseExpr
public void setElseExpr(Expression elseExpr)
-
typeChanged
public void typeChanged(HasType src, HasType root, Type oldType)
- Specified by:
typeChangedin interfaceHasType.TypeListener
-
possibleSubTypesChanged
public void possibleSubTypesChanged(HasType src, HasType root, java.util.Set<Type> oldSubTypes)
- Specified by:
possibleSubTypesChangedin interfaceHasType.TypeListener
-
toString
public java.lang.String toString()
- Overrides:
toStringin classExpression
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classExpression
-
hashCode
public int hashCode()
- Overrides:
hashCodein classExpression
-
-