Interface ObjectWriterInterface

All Known Implementing Classes:
ObjectWriter

public interface ObjectWriterInterface
The ObjectWriterInterface defines the contract for writing objects to a file. Implementations of this interface are responsible for setting the file name, the statement builder, the queue of statements, and executing the writing process.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes the object writing process to generate an output object file
    void
    Sets the builder to be used for constructing statements.
    void
    setFileName(String fileName)
    Sets the name of the output file.
    void
    Sets the queue of statements.
  • Method Details

    • setFileName

      void setFileName(String fileName)
      Sets the name of the output file.
      Parameters:
      fileName - the name of the file to be set
    • setBuilder

      void setBuilder(AbstractStatementBuilder builder)
      Sets the builder to be used for constructing statements.
      Parameters:
      builder - the AbstractStatementBuilder instance to be set
    • setQueue

      void setQueue(Queue<Statement> queue)
      Sets the queue of statements.
      Parameters:
      queue - the queue of statements to be set
    • execute

      Executes the object writing process to generate an output object file
      Throws:
      InvalidAssemblyFileException - if the assembly file is invalid.
      IOException - if an I/O error occurs during the writing process.