Class DeclWriter

    • Field Detail

      • debug

        public boolean debug
        Debug flag set from Chicory.debug_decl_print.
    • Constructor Detail

      • DeclWriter

        public DeclWriter​(PrintWriter writer)
        Constructs a DeclWriter, preparing it to receive messages.
        Parameters:
        writer - stream to write to
    • Method Detail

      • printHeaderInfo

        public void printHeaderInfo​(String className)
        Prints header information to the decls file. Should be called once before emitting any other declarations.
        Parameters:
        className - name of the top-level class (used only for printing comments)
      • classObjectName

        public static String classObjectName​(Class<?> type)
        Returns the correctly formulated ":::OBJECT" name of the class (i.e., the program point name)
        Parameters:
        type - the ClassType type
        Returns:
        the correctly formulated String
      • printDeclClass

        public void printDeclClass​(ClassInfo cinfo,
                                   @Nullable DeclReader comp_info)
        Prints declarations for all the methods in the indicated class. This method is called at run time to print decls info for a class.
        Parameters:
        cinfo - class whose declarations should be printed
        comp_info - comparability information