Skip to content
Snippets Groups Projects
Commit c0d663c9 authored by Sören Henning's avatar Sören Henning
Browse files

fixes

parent 2bd84e17
No related branches found
No related tags found
1 merge request!17Get impletemented stages and Java 8
Pipeline #
...@@ -4,6 +4,8 @@ import java.io.FileWriter; ...@@ -4,6 +4,8 @@ import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.Writer; import java.io.Writer;
import kieker.analysis.graph.Graph;
public abstract class AbstractDotFileWriterStage extends AbstractDotWriterStage { public abstract class AbstractDotFileWriterStage extends AbstractDotWriterStage {
public AbstractDotFileWriterStage() { public AbstractDotFileWriterStage() {
...@@ -11,14 +13,14 @@ public abstract class AbstractDotFileWriterStage extends AbstractDotWriterStage ...@@ -11,14 +13,14 @@ public abstract class AbstractDotFileWriterStage extends AbstractDotWriterStage
} }
@Override @Override
protected Writer getWriter() { protected Writer getWriter(final Graph graph) {
try { try {
return new FileWriter(getFileName()); return new FileWriter(getFileName(graph));
} catch (IOException e) { } catch (IOException e) {
throw new IllegalStateException(e); throw new IllegalStateException(e);
} }
} }
protected abstract String getFileName(); protected abstract String getFileName(final Graph graph);
} }
...@@ -14,10 +14,10 @@ public abstract class AbstractDotWriterStage extends AbstractConsumerStage<Graph ...@@ -14,10 +14,10 @@ public abstract class AbstractDotWriterStage extends AbstractConsumerStage<Graph
@Override @Override
protected final void execute(final Graph graph) { protected final void execute(final Graph graph) {
DotExporter dotExporter = new DotExporter(graph, getWriter()); DotExporter dotExporter = new DotExporter(graph, getWriter(graph));
dotExporter.transform(); dotExporter.transform();
} }
protected abstract Writer getWriter(); protected abstract Writer getWriter(final Graph graph);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment