Class IVMLFileWriter
- java.lang.Object
-
- net.ssehub.easy.producer.core.persistence.IVMLFileWriter
-
public class IVMLFileWriter extends java.lang.Object- Author:
- El-Sharkawy
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<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(Project mainProject)Saves the given project and all of its imports.voidsetFormatInitializer(boolean formatInitializer)Defines whether initializers shall be formatted.private voidwrite(Project project)Recursive method to save all rpoejcts and their imports.
-
-
-
Field Detail
-
done
private java.util.Set<Project> done
-
folder
private final java.io.File folder
-
formatInitializer
private boolean formatInitializer
-
forceCompoundTypes
private boolean forceCompoundTypes
-
-
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(Project mainProject) throws java.io.IOException
Saves 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(Project project) throws java.io.IOException
Recursive 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.
-
-