Class CallExpression
- 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.CallExpression
-
- All Implemented Interfaces:
DeclarationHolder,HasType,HasType.TypeListener,Persistable,IVisitable<Node>
- Direct Known Subclasses:
ExplicitConstructorInvocation,MemberCallExpression,StaticCallExpression
public class CallExpression extends Expression implements HasType.TypeListener
An expression, which calls another function. It has a list of arguments (list ofExpressions) and is connected via the INVOKES edge to itsFunctionDeclaration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.fraunhofer.aisec.cpg.graph.HasType
HasType.TypeListener
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<PropertyEdge<FunctionDeclaration>>invokesConnection to itsFunctionDeclaration.-
Fields inherited from class de.fraunhofer.aisec.cpg.graph.statements.expressions.Expression
type
-
-
Constructor Summary
Constructors Constructor Description CallExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArgument(Expression expression)booleanequals(java.lang.Object o)@NonNull java.util.List<Expression>getArguments()@NonNull java.util.List<PropertyEdge<Expression>>getArgumentsPropertyEdge()NodegetBase()java.lang.StringgetFqn()@NonNull java.util.List<FunctionDeclaration>getInvokes()java.util.List<PropertyEdge<FunctionDeclaration>>getInvokesPropertyEdge()java.util.List<Type>getSignature()inthashCode()voidpossibleSubTypesChanged(HasType src, HasType root, java.util.Set<Type> oldSubTypes)voidsetArgument(int index, Expression argument)voidsetArguments(java.util.List<Expression> arguments)voidsetBase(Node base)voidsetFqn(java.lang.String fqn)voidsetInvokes(java.util.List<FunctionDeclaration> invokes)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
-
-
-
-
Field Detail
-
invokes
protected java.util.List<PropertyEdge<FunctionDeclaration>> invokes
Connection to itsFunctionDeclaration. This will be populated by theCallResolver.
-
-
Method Detail
-
getBase
public Node getBase()
-
setBase
public void setBase(Node base)
-
getArguments
public @NonNull java.util.List<Expression> getArguments()
-
setArgument
public void setArgument(int index, Expression argument)
-
getArgumentsPropertyEdge
public @NonNull java.util.List<PropertyEdge<Expression>> getArgumentsPropertyEdge()
-
addArgument
public void addArgument(Expression expression)
-
setArguments
public void setArguments(java.util.List<Expression> arguments)
-
getInvokes
public @NonNull java.util.List<FunctionDeclaration> getInvokes()
-
getInvokesPropertyEdge
public java.util.List<PropertyEdge<FunctionDeclaration>> getInvokesPropertyEdge()
-
setInvokes
public void setInvokes(java.util.List<FunctionDeclaration> invokes)
-
getSignature
public java.util.List<Type> getSignature()
-
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
-
getFqn
public java.lang.String getFqn()
-
setFqn
public void setFqn(java.lang.String fqn)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classExpression
-
hashCode
public int hashCode()
- Overrides:
hashCodein classExpression
-
-