Class AttributeFileIO

java.lang.Object
simula.compiler.AttributeFileIO

public final class AttributeFileIO extends Object

Simula attribute file input/output.

Link to GitHub: Source File.

Author:
Øystein Myhre Andersen
  • Field Details

  • Constructor Details

    • AttributeFileIO

      private AttributeFileIO()
      Default Constructor: NOT USED
  • Method Details

    • writeAttributeFile

      static void writeAttributeFile(ProgramModule program) throws IOException
      Write an attribute file.
      Parameters:
      program - the program module
      Throws:
      IOException - if an output operation fail
    • buildAttrFile

      private static byte[] buildAttrFile(ProgramModule program) throws IOException
      Build a module's attribute file.
      Parameters:
      program - the program module.
      Returns:
      the attribute file's bytes.
      Throws:
      IOException - if an io-error occurs.
    • readAttributeFile

      public static Type readAttributeFile(String identifier, File file, BlockDeclaration enclosure)
      Read an attribute file.
      Parameters:
      identifier - class or procedure identifier
      file - the .jar file to read
      enclosure - the declaration list to update
      Returns:
      the module type
    • readPrecompiled

      private static BlockDeclaration readPrecompiled(String fileID, byte[] attrFile) throws IOException
      Read and return precompiled class or procedure.
      Parameters:
      fileID - the file ident.
      attrFile - the attribute file.
      Returns:
      the resulting class or procedure.
      Throws:
      IOException - if somthing went wrong.