Add state generator to simplify generator creation for cluster subcomponents

parent d2b210b0
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class StateGenerator implements GeneratorImpl{
private GeneratorImpl delegateGenerator;
private EMAComponentInstanceSymbol component;
private TaggingResolver taggingResolver;
public StateGenerator(GeneratorImpl delegateGenerator, EMAComponentInstanceSymbol component, TaggingResolver taggingResolver) {
this.delegateGenerator = delegateGenerator;
this.component = component;
this.taggingResolver = taggingResolver;
}
public void setGenerationTargetPath(String path) {
delegateGenerator.setGenerationTargetPath(path);
}
public List<File> generate() throws IOException {
return delegateGenerator.generate(component, taggingResolver);
}
@Override
public List<File> generate(EMAComponentInstanceSymbol componentInstanceSymbol, TaggingResolver taggingResolver) throws IOException {
return generate();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment