Package edu.iu.jrsalata
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 TypeMethodDescriptionvoid
execute()
Executes the object writing process to generate an output object filevoid
setBuilder
(AbstractStatementBuilder builder) 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
Sets the name of the output file.- Parameters:
fileName
- the name of the file to be set
-
setBuilder
Sets the builder to be used for constructing statements.- Parameters:
builder
- the AbstractStatementBuilder instance to be set
-
setQueue
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.
-