Package de.fraunhofer.aisec.cpg.passes
Class CallResolver
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.passes.Pass
-
- de.fraunhofer.aisec.cpg.passes.CallResolver
-
- All Implemented Interfaces:
java.util.function.Consumer<TranslationResult>
public class CallResolver extends Pass
ResolvesCallExpressionandNewExpressiontargets.A
CallExpressionspecifies the method that wants to be called viaNode.getName(). The call target is a method of the same class the caller belongs to, so the name is resolved to the appropriateMethodDeclaration. This pass also takes into consideration that a method might not be present in the current class, but rather has its implementation in a superclass, and sets the pointer accordingly.Constructor calls with
NewExpressionare resolved in such a way that theirNewExpression.getInstantiates()points to the correctRecordDeclaration. Additionally, theConstructExpression.getConstructor()is set to the accordingConstructorDeclaration
-
-
Constructor Summary
Constructors Constructor Description CallResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(@NonNull TranslationResult translationResult)voidcleanup()-
Methods inherited from class de.fraunhofer.aisec.cpg.passes.Pass
getLang, setLang, supportsLanguageFrontend
-
-
-
-
Method Detail
-
accept
public void accept(@NonNull TranslationResult translationResult)
-
-