Class IVMLFileWriter
- java.lang.Object
-
- net.ssehub.easy.producer.core.persistence.IVMLFileWriter
-
public class IVMLFileWriter extends java.lang.ObjectExtendedIVMLWriter, which writesProjects and their importedProjects to a given location.- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<net.ssehub.easy.varModel.model.Project>doneprivate java.io.Filefolderprivate booleanforceCompoundTypesprivate booleanformatInitializer
-
Constructor Summary
Constructors Constructor Description IVMLFileWriter(java.io.File folder)sole constructor for this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforceComponundTypes(boolean forceCompoundTypes)Forces the output of compound types and bypasses the automatic detection.voidsave(net.ssehub.easy.varModel.model.Project mainProject)Saves the given project and all of its imports.voidsetFormatInitializer(boolean formatInitializer)Defines whether initializers shall be formatted.private voidwrite(net.ssehub.easy.varModel.model.Project project)Recursive method to save all rpoejcts and their imports.
-
-
-
Constructor Detail
-
IVMLFileWriter
public IVMLFileWriter(java.io.File folder) throws java.io.IOExceptionsole constructor for this class.- Parameters:
folder- The folder where all projects shall be saved to.- Throws:
java.io.IOException- If the given specified folder is not a folder or does not exist.
-
-
Method Detail
-
setFormatInitializer
public void setFormatInitializer(boolean formatInitializer)
Defines whether initializers shall be formatted.- Parameters:
formatInitializer-trueif initializers shall be formatted,falseelse
-
forceComponundTypes
public void forceComponundTypes(boolean forceCompoundTypes)
Forces the output of compound types and bypasses the automatic detection.- Parameters:
forceCompoundTypes- iftrue, compound types are always emitted at creation,falseelse
-
save
public void save(net.ssehub.easy.varModel.model.Project mainProject) throws java.io.IOExceptionSaves the given project and all of its imports.- Parameters:
mainProject- The starting project to save.- Throws:
java.io.IOException- If an IO error occurs during saving one of the projects.
-
write
private void write(net.ssehub.easy.varModel.model.Project project) throws java.io.IOExceptionRecursive method to save all rpoejcts and their imports.- Parameters:
project- The current project so save- Throws:
java.io.IOException- If an IO error occurs during saving one of the projects.
-
-