|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.utwente.CoCompose.lang.ModelVisitor | +--EDU.utwente.CoCompose.translate.FlattenVisitorDepthFirst
Flattens the model using available solution patterns. Uses a depth first strategy, so it can already return after flattening one option.
Field Summary | |
protected boolean |
flattenNeeded
When false, flattening did not change model, so it was not needed. |
Fields inherited from class EDU.utwente.CoCompose.lang.ModelVisitor |
log |
Constructor Summary | |
FlattenVisitorDepthFirst()
Constructs a FlattenVisitor. |
Method Summary | |
protected void |
addDontFlatten(Composite composite)
Adds a composite to the set of composites that should not be flattened. |
protected java.lang.Object |
clone()
Create a shared copy of this. |
protected boolean |
dontFlatten(Composite composite)
Checks whether a composite should be flattened based on the set of composites that need not be flattened. |
protected SolutionPattern |
getCurrentOption()
Gets the current flattening option for this visitor to continue at. |
Model |
getFlatModel()
Gets the flattened model so far. |
protected boolean |
getFull()
Gets full flattening. |
FlattenVisitorDepthFirst |
getNextFlattenVisitor()
Gets the next flattening option branch visitor. |
protected void |
setCurrentOption(SolutionPattern currentOption)
Sets the current flattening option for this visitor to continue at. |
protected void |
setFlatModel(Model flatModel)
Sets the flattened model so far. |
void |
setFull(boolean full)
Sets full flattening. |
void |
setLogger(Logger logger)
Sets the logger object. |
protected void |
setNextFlattenVisitor(FlattenVisitorDepthFirst nextFlatten)
Sets the next flattening option branch visitor. |
void |
visitComposite(Composite composite)
Flattens a Composite object. |
void |
visitModel(Model model)
Flattens the model. |
Methods inherited from class EDU.utwente.CoCompose.lang.ModelVisitor |
getUpdate, run, setErrorReporter, setUpdate, startModel, visitAbstractConcept, visitCompositePartConcept, visitCompositeRole, visitConcept, visitConstrainedConcept, visitImplementation, visitImplementationGenerator, visitImplementationRolePart, visitLink, visitPublishedConcept, visitSolutionPattern, visitSolutionRole |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean flattenNeeded
Constructor Detail |
public FlattenVisitorDepthFirst()
Method Detail |
protected boolean getFull()
protected void setCurrentOption(SolutionPattern currentOption)
currentOption
- The current flattening option.protected SolutionPattern getCurrentOption()
protected void setFlatModel(Model flatModel)
flatModel
- The flattened model.protected boolean dontFlatten(Composite composite)
composite
- The compositeprotected void addDontFlatten(Composite composite)
composite
- The composite that should not be flattened.protected java.lang.Object clone()
clone
in class java.lang.Object
protected void setNextFlattenVisitor(FlattenVisitorDepthFirst nextFlatten)
flatten
- The next flatten visitor.public FlattenVisitorDepthFirst getNextFlattenVisitor()
public void setLogger(Logger logger)
setLogger
in class ModelVisitor
logger
- The object to log topublic void setFull(boolean full)
full
- If true, does full flattening, otherwise one level flattening.public Model getFlatModel()
public void visitModel(Model model) throws CoComposeException
visitModel
in class ModelVisitor
model
- The model to flatten.CoComposeException
- if one of the model's constraints are not fulfilled or
if the model could not be flattened.public void visitComposite(Composite composite) throws CoComposeException
visitComposite
in class ModelVisitor
composite
- The composite to flatten.CoComposeException
- if the composite cannot be flattened for the target language of the model.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |