Class TypeHierarchyResolver

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

    public class TypeHierarchyResolver
    extends java.lang.Object
    implements 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

      • getLang

        public LanguageFrontend getLang()
        Description copied from interface: Pass
        We do not want the passes to depend on a language frontend
        Specified by:
        getLang in interface Pass
        Returns:
        might be null, as it is not designed to be used anymore
      • setLang

        public void setLang​(LanguageFrontend lang)
        Description copied from interface: Pass
        We do not want the passes to depend on a language frontend
        Specified by:
        setLang in interface Pass
      • cleanup

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