Commit fa425015 authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Javadoc.

Cosmetics.
parent 750d47fd
......@@ -33,7 +33,7 @@ import org.objectweb.fractal.juliac.api.generator.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.desc.ComponentDesc;
/**
* Interface for optimization level source code generators.
* Interface for Fractal component code generators.
*
* @param <M> the type of the membrane descriptor
*
......@@ -111,7 +111,7 @@ extends JuliacModuleItf {
throws IOException;
/**
* Generate the implementation of the membrane associated to a Fractal
* Generate the source code of the membrane associated to a Fractal
* component.
*
* @param ct the component type
......@@ -126,7 +126,7 @@ extends JuliacModuleItf {
throws IOException;
/**
* Return the class generator for component interfaces.
* Return the code generator for component interfaces.
*/
public SourceCodeGeneratorItf getInterfaceClassGenerator(InterfaceType it);
}
......@@ -53,10 +53,16 @@ import org.objectweb.fractal.juliac.visit.BoundedIOWriterMethodSourceCodeWriter;
import org.objectweb.fractal.util.Fractal;
/**
* This class generates the source code of a component {@link
* org.objectweb.fractal.api.factory.Factory}. This class is extended in
* sub-packages with two concrete extensions: one which relies on a Fractal ADL
* backend to parse an ADL file and one which visits a model of an ADL file.
* <p>
* This class generates the source code of a component {@link Factory}.
* This class is extended in sub-packages with two concrete
* implementations:
* </p>
*
* <ul>
* <li>one that relies on a Fractal ADL backend to parse an ADL file,</li>
* <li>one that visits a model of an ADL file.</li>
* </ul>
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @author Romain Rouvoy <Romain.Rouvoy@univ-lille1.fr>
......
......@@ -28,7 +28,7 @@ import org.objectweb.fractal.juliac.api.visit.ClassSourceCodeVisitor;
import org.objectweb.fractal.juliac.api.visit.FileSourceCodeVisitor;
/**
* Default implementation for {@link ClassGeneratorItf}s.
* Default implementation for class generators.
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @since 2.2.2
......
......@@ -27,7 +27,7 @@ import org.objectweb.fractal.juliac.api.visit.FileSourceCodeVisitor;
import org.objectweb.fractal.juliac.api.visit.InterfaceSourceCodeVisitor;
/**
* Default implementation for interfaces.
* Default implementation for interface generators.
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @since 2.6
......
......@@ -26,12 +26,11 @@ package org.objectweb.fractal.juliac.opt;
import java.lang.reflect.Modifier;
import java.util.Date;
import org.objectweb.fractal.juliac.api.generator.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.api.generator.TypeGeneratorItf;
import org.objectweb.fractal.juliac.api.visit.FileSourceCodeVisitor;
/**
* Default implementation for {@link SourceCodeGeneratorItf}s.
* Default implementation for type generators.
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @since 2.6
......
......@@ -31,7 +31,6 @@ import org.objectweb.fractal.juliac.api.visit.ThenSourceCodeVisitor;
import com.google.common.base.Preconditions;
/**
* A {@link BlockSourceCodeVisitor} which generates the source code of an abstract block
* of code.
......@@ -40,28 +39,23 @@ import com.google.common.base.Preconditions;
* @since 2.3
*/
public class AbstractSourceCodeWriter extends AbstractCodeWriter implements BlockSourceCodeVisitor {
public AbstractSourceCodeWriter(PrintWriter writer) {
super(writer,1);
}
private final BlockSourceCodeVisitor illegalState() {
throw new IllegalStateException("Block body cannot be visited at this stage of the visit");
}
/**
* Visit the beginning of the block.
*/
public BlockSourceCodeVisitor visitBegin() {
Preconditions.checkState(state == BEGIN_STATE, "Block beginning cannot be visited at this stage of the visit");
writeln(";");
writeln(";");
state = FINAL_STATE;
return this;
}
......
......@@ -84,7 +84,6 @@ public class BlockSourceCodeWriter extends AbstractCodeWriter implements
checkBodyState("body");
writer().write(asString(code)+"\n");
// writeln(code);
return this;
}
......
Supports Markdown
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