Class TypeHierarchyResolver

  • All Implemented Interfaces:
    java.util.function.Consumer<TranslationResult>

    public class TypeHierarchyResolver
    extends Pass
    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()

    • Constructor Detail

      • TypeHierarchyResolver

        public TypeHierarchyResolver()
    • Method Detail

      • setLang

        public void setLang​(LanguageFrontend lang)
        Description copied from class: Pass
        Passes may need information about what source language they are parsing.
        Overrides:
        setLang in class Pass
        Parameters:
        lang - May be null
      • cleanup

        public void cleanup()
        Specified by:
        cleanup in class Pass