net.anotheria.asg.generator.GenerationJob Maven / Gradle / Ivy
The newest version!
package net.anotheria.asg.generator;
/**
* Mostly currently executed generation job.
*
* @author lrosenberg
* @version $Id: $Id
*/
public class GenerationJob {
/**
* The string builder with file content.
*/
private StringBuilder builder;
/**
* Currently generated artefact.
*/
private GeneratedArtefact artefact;
/**
* Creates and starts a new job.
*/
public GenerationJob(){
reset();
}
/**
* Constructor for GenerationJob.
*
* @param aBuilder a {@link java.lang.StringBuilder} object.
*/
public GenerationJob(StringBuilder aBuilder){
builder = aBuilder;
artefact = null;
}
/**
* Sets the generation of the given artefact as the current job.
*
* @param anArtefact a {@link net.anotheria.asg.generator.GeneratedArtefact} object.
*/
public GenerationJob(GeneratedArtefact anArtefact){
artefact = anArtefact;
builder = artefact.getBody();
}
/**
* getStringBuilder.
*
* @return a {@link java.lang.StringBuilder} object.
*/
public StringBuilder getStringBuilder(){
return builder;
}
/**
* Getter for the field artefact
.
*
* @return a {@link net.anotheria.asg.generator.GeneratedArtefact} object.
*/
public GeneratedArtefact getArtefact(){
return artefact;
}
/**
* reset.
*/
public void reset(){
builder = new StringBuilder(5000);
artefact = null;
}
/**
* Setter for the field builder
.
*
* @param target a {@link java.lang.StringBuilder} object.
*/
public void setBuilder(StringBuilder target){
builder = target;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy