TypeHierarchyResolver

Transitively RecordDeclaration nodes 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

Attention: Needs to be run before other analysis passes, as it triggers a type refresh. This is needed e.g. for de.fraunhofer.aisec.cpg.graph.TypeManager.getCommonType to be re-evaluated at places where it is crucial to have parsed all RecordDeclarations. Otherwise, type information in the graph might not be fully correct

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
open override fun accept(translationResult: TranslationResult)
Link copied to clipboard
fun addSoftDependency(toAdd: Class<out Pass?>)
Link copied to clipboard
Link copied to clipboard
open override fun cleanup()
Link copied to clipboard

Check if the pass requires a specific language frontend and if that frontend has been executed.

Link copied to clipboard

Specifies, whether this pass supports this particular language. This defaults to true * and needs to be overridden if a different behaviour is wanted.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard