Package de.fraunhofer.aisec.cpg.passes
Class TypeHierarchyResolver
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.passes.TypeHierarchyResolver
-
- All Implemented Interfaces:
Pass,java.util.function.Consumer<TranslationResult>
public class TypeHierarchyResolver extends java.lang.Object implements Pass
TransitivelyRecordDeclarationnodes with their supertypes' records.Supertypes are all interfaces a class implements and the superclass it inherits from, including all of their respective supertypes). The JavaParser provides us with initial info about direct ancestors' names. This pass then recursively maps those and their own supertypes to the correct
RecordDeclaration(if available).After determining the ancestors of a class, all inherited methods are scanned to find out which of them are overridden/implemented in the current class. See
FunctionDeclaration.getOverriddenBy()
-
-
Constructor Summary
Constructors Constructor Description TypeHierarchyResolver()
-
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>
-
-