Class AttributeFileIO
java.lang.Object
simula.compiler.AttributeFileIO
Simula attribute file input/output.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static byte[]
buildAttrFile
(ProgramModule program) Build a module's attribute file.static Type
readAttributeFile
(String identifier, File file, BlockDeclaration enclosure) Read an attribute file.private static BlockDeclaration
readPrecompiled
(String fileID, byte[] attrFile) Read and return precompiled class or procedure.(package private) static void
writeAttributeFile
(ProgramModule program) Write an attribute file.
-
Field Details
-
version
-
-
Constructor Details
-
AttributeFileIO
private AttributeFileIO()Default Constructor: NOT USED
-
-
Method Details
-
writeAttributeFile
Write an attribute file.- Parameters:
program
- the program module- Throws:
IOException
- if an output operation fail
-
buildAttrFile
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
Read an attribute file.- Parameters:
identifier
- class or procedure identifierfile
- the .jar file to readenclosure
- the declaration list to update- Returns:
- the module type
-
readPrecompiled
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.
-