translate
Class ConcernJImplementationVisitor
java.lang.Object
|
+--EDU.utwente.CoCompose.lang.ModelVisitor
|
+--EDU.utwente.CoCompose.translate.GenerateImplementationVisitor
|
+--translate.JavaImplementationVisitor
|
+--translate.ConcernJImplementationVisitor
- All Implemented Interfaces:
- java.lang.Runnable
- public class ConcernJImplementationVisitor
- extends JavaImplementationVisitor
Generates ConcernJ implementation for a CoCompose model.
- Version:
- 0.1.10, 22 July 2003
- Author:
- Dennis Wagelaar
Method Summary |
protected void |
conceptAsConcern(Concept concept)
Implements the concept as a Concern. |
protected void |
conceptAsCondition(Concept concept)
Implements the concept as a Condition. |
protected void |
conceptAsFiltermodule(Concept concept)
Implements the concept as a Filtermodule. |
protected void |
conceptAsMethod(Concept concept)
Implements the concept as a Method. |
protected java.lang.String |
getImplPart(java.lang.String attr,
java.lang.String impl)
Retrieves the right part from the implementation. |
protected java.lang.String |
getPointerAttribute(java.lang.String attr,
java.lang.String impl)
Gets the pointer attribute part of the implementation for the given
entity. |
java.lang.String |
getTargetLanguage()
Returns the target language this GenerateImplementationVisitor supports. |
protected void |
moveImports()
Moves the import declarations in the implementations to the right place. |
void |
visitConcept(Concept concept)
Generates implementation for a Concept object. |
protected void |
writeImplementation(Model model,
java.lang.String outdir)
Writes the implementation of the model. |
Methods inherited from class translate.JavaImplementationVisitor |
conceptAsClass, conceptAsConstructorMethod, conceptAsInterface, conceptAsMethod, conceptAsOther, getImplementation, removeExtraNewlines, substVars, visitModel, weavePointers, weavePointers |
Methods inherited from class EDU.utwente.CoCompose.translate.GenerateImplementationVisitor |
dumpImplementation, getForms, getImpl, getImpl, getImplementation, getImpls, indent, removeForm, setForm, setImpl, setImpl, visitComposite, visitImplementation, visitImplementationGenerator, writeFile |
Methods inherited from class EDU.utwente.CoCompose.lang.ModelVisitor |
getUpdate, run, setErrorReporter, setLogger, setUpdate, startModel, visitAbstractConcept, visitCompositePartConcept, visitCompositeRole, visitConstrainedConcept, visitImplementationRolePart, visitLink, visitPublishedConcept, visitSolutionPattern, visitSolutionRole |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConcernJImplementationVisitor
public ConcernJImplementationVisitor()
- Constructs a ConcernJImplementationVisitor.
conceptAsConcern
protected void conceptAsConcern(Concept concept)
- Implements the concept as a Concern.
- Parameters:
concept
- The concept to implement.
conceptAsMethod
protected void conceptAsMethod(Concept concept)
- Implements the concept as a Method.
- Parameters:
concept
- The concept to implement.
conceptAsCondition
protected void conceptAsCondition(Concept concept)
- Implements the concept as a Condition.
- Parameters:
concept
- The concept to implement.
conceptAsFiltermodule
protected void conceptAsFiltermodule(Concept concept)
- Implements the concept as a Filtermodule.
- Parameters:
concept
- The concept to implement.
getImplPart
protected java.lang.String getImplPart(java.lang.String attr,
java.lang.String impl)
throws CoComposeException
- Retrieves the right part from the implementation.
- Overrides:
getImplPart
in class JavaImplementationVisitor
- Parameters:
attr
- The pointer attributes, if any.impl
- The current implementation.- Returns:
- The correct part of the implementation.
- Throws:
CoComposeException
- if the part could not be found.
getPointerAttribute
protected java.lang.String getPointerAttribute(java.lang.String attr,
java.lang.String impl)
throws CoComposeException
- Gets the pointer attribute part of the implementation for the given
entity.
- Overrides:
getPointerAttribute
in class JavaImplementationVisitor
- Parameters:
attr
- The pointer attribute identifier.impl
- The implementation to get the attribute part for.- Throws:
CoComposeException
- if the part could not be found.
moveImports
protected void moveImports()
- Moves the import declarations in the implementations to the right place.
- Overrides:
moveImports
in class JavaImplementationVisitor
writeImplementation
protected void writeImplementation(Model model,
java.lang.String outdir)
throws CoComposeException
- Writes the implementation of the model.
- Overrides:
writeImplementation
in class JavaImplementationVisitor
- Parameters:
model
- The model to write the implementation for.outdir
- The directory to save the implementation files.- Throws:
CoComposeException
- if writing the implementation failed.
getTargetLanguage
public java.lang.String getTargetLanguage()
- Returns the target language this GenerateImplementationVisitor supports.
- Overrides:
getTargetLanguage
in class JavaImplementationVisitor
- Returns:
- The target language.
visitConcept
public void visitConcept(Concept concept)
throws CoComposeException
- Generates implementation for a Concept object.
- Overrides:
visitConcept
in class JavaImplementationVisitor
- Parameters:
concept
- The concept to visit.- Throws:
CoComposeException
- if generating implementation failed.