Package de.fraunhofer.aisec.cpg.passes
Class CallResolver
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.passes.CallResolver
-
- All Implemented Interfaces:
Pass,java.util.function.Consumer<TranslationResult>
public class CallResolver extends java.lang.Object implements 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(TranslationResult translationResult)voidcleanup()LanguageFrontendgetLang()We do not want the passes to depend on a language frontendvoidsetLang(LanguageFrontend lang)We do not want the passes to depend on a language frontend-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.fraunhofer.aisec.cpg.passes.Pass
createUnknownTranslationUnit
-
-
-
-
Method Detail
-
getLang
public LanguageFrontend getLang()
Description copied from interface:PassWe do not want the passes to depend on a language frontend
-
setLang
public void setLang(LanguageFrontend lang)
Description copied from interface:PassWe do not want the passes to depend on a language frontend
-
accept
public void accept(TranslationResult translationResult)
- Specified by:
acceptin interfacejava.util.function.Consumer<TranslationResult>
-
-