Class IVMLWriter
- java.lang.Object
-
- net.ssehub.easy.varModel.model.AbstractVisitor
-
- net.ssehub.easy.varModel.persistency.AbstractVarModelWriter
-
- net.ssehub.easy.varModel.persistency.IVMLWriter
-
- All Implemented Interfaces:
IConstraintTreeVisitor,ICustomDatatypeVisitor,IModelVisitor,IValueVisitor
- Direct Known Subclasses:
CommentResourceVisitor,ConfigurableIVMLWriter,ConstraintSplitWriter
public class IVMLWriter extends AbstractVarModelWriter
Writer for writing the variability model to an IVML output file. Please note that this writer creates output regardless of the correctness of the semantics of the model being visited. However, if the full IVML infrastructure including the IVML parser is used and given interfaces of this model are used properly, the output will be valid. In case that the classes in this model package are directly used from external code, it is strongly advised to use theIvmlValidationVisitorto check the validity of the visited model before producing output.- Author:
- El-Sharkawy, Marcel Lueder, Holger Eichelberger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.ssehub.easy.varModel.persistency.AbstractVarModelWriter
AbstractVarModelWriter.DefaultSpace
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Stack<OCLFeatureCall>callStackprivate booleanemitCommentsprivate booleanforceCompoundTypesprivate booleanformatInitializerprivate java.util.Set<Attribute>handledprivate DecisionVariableDeclarationinDeclprivate java.util.Stack<Comment>lastCommentprivate java.util.Stack<ConstraintSyntaxTree>nestedExpressionsprivate java.util.Stack<Value>nestedValuesprivate static java.util.List<IVMLWriter>POOLprivate VariableUsagevariableUsage-
Fields inherited from class net.ssehub.easy.varModel.persistency.AbstractVarModelWriter
DUMMY_PARENT
-
-
Constructor Summary
Constructors Modifier Constructor Description IVMLWriter(java.io.Writer writer)Class for writingivmloutput appropriate for the EASy-Producer tool.protectedIVMLWriter(java.io.Writer writer, boolean emitComments)Creates a writer instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendOCLFeatureCall(OCLFeatureCall call, Operation.FormattingHint hint)Does the formatting of an OCL feature call and allows for overwriting.protected voidbeforeNestedElement(java.lang.Object element)This method is called before a nested element is emitted.private voiddupLastComment()Duplicates the last comment on the stack for nesting.booleanemitComments()Returns whether comments are emitted by this writer.protected voidemitDecisionVariableDeclarationDefault(DecisionVariableDeclaration decl, ConstraintSyntaxTree defaultValue)Emits the default value of a decision variable declaration (for extension).private voidemitDecisionVariableDeclarationExpression(DecisionVariableDeclaration decl, ConstraintSyntaxTree defaultValue)Emits the expression part of a variable declaration without the statement part.private voidemitType(IDatatype type, boolean considerValues)Emits the type of an initializer if required.protected voidendWritingCompound(Compound compound)Method for writing a compound, second part.protected voidendWritingProject(Project project)Method for writing a project, second part.voidforceComponundTypes(boolean forceCompoundTypes)Forces the output of compound types and bypasses the automatic detection.static IVMLWritergetInstance(java.io.Writer writer)Obtains an instance from the pool (always emitting comments).private CommentgetLastComment()Returns the last comment from the internal comment stack.private booleanneedsQualification(AbstractVariable var)Determines whether (on-demand) qualification of the givenvaris needed, i.e., whether its qualified name shall be printed out.private booleanneedsQualificationThroughContext(java.lang.Object context, java.lang.String name, AbstractVariable var, boolean exclude)Returns whether the variable namenameofvarneeds qualification within its contextcontext.private CommentpopLastComment()Removes the comment on top of the stack.protected voidprintDefaultSpace(AbstractVarModelWriter.DefaultSpace location)Prints default spaces.protected voidprocessVersion(Version version)Processes a version information.static voidreleaseInstance(IVMLWriter writer)Releases an instance to the pool.voidsetFormatInitializer(boolean formatInitializer)Defines whether initializers shall be formatted.private voidsetLastComment(Comment comment)Defines the next comment on top of the stack (combined pop/push).protected voidstartWritingCompound(Compound compound)Method for writing a compound, first part.protected voidstartWritingProject(Project project)Method for writing a project, first part.voidvisitAnnotationVariable(AttributeVariable variable)Visits aAttributeVariable.voidvisitAttribute(Attribute attribute)Method for visiting an attribute.voidvisitAttributeAssignment(AttributeAssignment assignment)Visits an attribute assignment.voidvisitBlockExpression(BlockExpression block)Visits the block.voidvisitBooleanValue(BooleanValue value)This method is used for visiting BooleanValue.voidvisitComment(Comment comment)Visits a comment.voidvisitComment(Comment comment)Method for visiting a comment.voidvisitCompound(Compound compound)Method for visiting a compound.voidvisitCompoundAccess(CompoundAccess access)Visits a compound access node.voidvisitCompoundAccessStatement(CompoundAccessStatement access)Visits a compound access statement (may occur in freeze blocks.private intvisitCompoundDecisionVariableContainer(IDecisionVariableContainer cont, CompoundValue value, int printed, java.util.Set<java.lang.String> done)Visits a compound decision variable container for output of configuration values.voidvisitCompoundInitializer(CompoundInitializer initializer)Visits a compound initializer.private intvisitCompoundRefines(Compound comp, CompoundValue value, int count, java.util.Set<java.lang.String> done)voidvisitCompoundValue(CompoundValue value)This method is used for visiting CompoundValue.voidvisitConstraint(Constraint constraint)Method for visiting a constraint.voidvisitContainerInitializer(ContainerInitializer initializer)Visits a container initializer.voidvisitContainerOperationCall(ContainerOperationCall call)Visits a container operation call (e.g.voidvisitContainerValue(ContainerValue value)This method is used for visiting ContainerValue.voidvisitDecisionVariableDeclaration(DecisionVariableDeclaration decl)This method is used for visiting a decision variable declaration.voidvisitDeferInitExpression(DeferInitExpression expression)Visits a default init expression.voidvisitDerivedDatatype(DerivedDatatype datatype)Method for visiting a derived datatype.voidvisitEnum(Enum eenum)Method for visiting an enum.voidvisitEnumLiteral(EnumLiteral literal)Method for visiting an enum literal.voidvisitEnumValue(EnumValue value)This method is used for visiting EnumValue.voidvisitFreezeBlock(FreezeBlock freeze)Method for visiting a freeze block.voidvisitIfThen(IfThen ifThen)Visits an if-then-else expression.voidvisitIntValue(IntValue value)This method is used for visiting IntValue.voidvisitLet(Let let)Visits a let expression.voidvisitMetaTypeValue(MetaTypeValue value)This method is used for visiting meta type value.voidvisitMultiAndExpression(MultiAndExpression expression)Visits a multi-and expression.voidvisitNullValue(NullValue value)This method is used for visiting a null value.voidvisitOclFeatureCall(OCLFeatureCall call)Visits an OCL feature call.voidvisitOperationDefinition(OperationDefinition opdef)Method for visiting an operation definition.voidvisitParenthesis(Parenthesis parenthesis)Visits a parenthesis.voidvisitPartialEvaluationBlock(PartialEvaluationBlock block)Method for visiting a partial evaluation block.voidvisitProject(Project project)Method for visiting a project.voidvisitProjectImport(ProjectImport pImport)This method is used for visiting a ProjectImport.voidvisitProjectInterface(ProjectInterface iface)Method for visiting a project interface.voidvisitRealValue(RealValue value)This method is used for visiting RealValue.voidvisitReference(Reference reference)Method for visiting a reference.voidvisitReferenceValue(ReferenceValue referenceValue)This method is used for visiting referenceValue.voidvisitSelf(Self self)Visits self.voidvisitSequence(Sequence sequence)Method for visiting a sequence.voidvisitSet(Set set)Method for visiting a set.voidvisitStringValue(StringValue value)This method is used for visiting StringValue.voidvisitVariable(Variable variable)Visits a variable.voidvisitVersionValue(VersionValue value)This method is used for visiting a version value.protected booleanwriteValue(Value value)Returns whether a certain value shall be written.-
Methods inherited from class net.ssehub.easy.varModel.persistency.AbstractVarModelWriter
addParent, appendIndentation, appendOutput, appendOutput, considerOclCompliance, decreaseAdditionalIndentation, emitConstraintExpression, flush, getExpressionContext, getIndentation, getIvmlIndentStep, getLogger, getParent, getParent, getParent, getParentCount, getUseIvmlWhitespace, getWriter, increaseAdditionalIndentation, removeLastParent, setExpressionContext, setIndentationStep, setIndentStep, setOclCompliance, setUseIvmlWhitespace, setUseWhitespaces, setWriter, visitConstantValue, visitConstraintValue, visitOrderedEnum, visitUnresolvedExpression
-
-
-
-
Field Detail
-
POOL
private static final java.util.List<IVMLWriter> POOL
-
nestedValues
private java.util.Stack<Value> nestedValues
-
nestedExpressions
private java.util.Stack<ConstraintSyntaxTree> nestedExpressions
-
callStack
private java.util.Stack<OCLFeatureCall> callStack
-
emitComments
private boolean emitComments
-
lastComment
private java.util.Stack<Comment> lastComment
-
handled
private java.util.Set<Attribute> handled
-
variableUsage
private VariableUsage variableUsage
-
formatInitializer
private boolean formatInitializer
-
forceCompoundTypes
private boolean forceCompoundTypes
-
inDecl
private DecisionVariableDeclaration inDecl
-
-
Constructor Detail
-
IVMLWriter
public IVMLWriter(java.io.Writer writer)
Class for writingivmloutput appropriate for the EASy-Producer tool.- Parameters:
writer- Writer which should be used for writing the output.
-
IVMLWriter
protected IVMLWriter(java.io.Writer writer, boolean emitComments)Creates a writer instance. Due to the pooling mechanism, disabling comments can only be done by a non-pooled subclass.- Parameters:
writer- the writer which should be used for writing the outputemitComments- whether comments shall be emitted or ignored
-
-
Method Detail
-
setFormatInitializer
public void setFormatInitializer(boolean formatInitializer)
Defines whether initializers shall be formatted.- Parameters:
formatInitializer-trueif initializers shall be formatted,falseelse
-
forceComponundTypes
public void forceComponundTypes(boolean forceCompoundTypes)
Forces the output of compound types and bypasses the automatic detection.- Parameters:
forceCompoundTypes- iftrue, compound types are always emitted at creation,falseelse
-
emitComments
public boolean emitComments()
Description copied from class:AbstractVarModelWriterReturns whether comments are emitted by this writer.- Specified by:
emitCommentsin classAbstractVarModelWriter- Returns:
trueif comments are emitted,falseelse
-
getInstance
public static final IVMLWriter getInstance(java.io.Writer writer)
Obtains an instance from the pool (always emitting comments).- Parameters:
writer- the target output writer- Returns:
- the instance, to be released by
releaseInstance(IVMLWriter)
-
releaseInstance
public static final void releaseInstance(IVMLWriter writer)
Releases an instance to the pool.- Parameters:
writer- the instance to be released
-
printDefaultSpace
protected void printDefaultSpace(AbstractVarModelWriter.DefaultSpace location)
Description copied from class:AbstractVarModelWriterPrints default spaces.- Specified by:
printDefaultSpacein classAbstractVarModelWriter- Parameters:
location- the intended location of the space
-
startWritingProject
protected void startWritingProject(Project project)
Description copied from class:AbstractVarModelWriterMethod for writing a project, first part.- Specified by:
startWritingProjectin classAbstractVarModelWriter- Parameters:
project- The project which should be saved.
-
endWritingProject
protected void endWritingProject(Project project)
Description copied from class:AbstractVarModelWriterMethod for writing a project, second part.- Specified by:
endWritingProjectin classAbstractVarModelWriter- Parameters:
project- The project which should be saved.
-
processVersion
protected void processVersion(Version version)
Description copied from class:AbstractVarModelWriterProcesses a version information.- Specified by:
processVersionin classAbstractVarModelWriter- Parameters:
version- the version to be processed
-
visitProject
public void visitProject(Project project)
Description copied from interface:IModelVisitorMethod for visiting a project.- Specified by:
visitProjectin interfaceIModelVisitor- Overrides:
visitProjectin classAbstractVarModelWriter- Parameters:
project- The project which should be visited.
-
visitProjectImport
public void visitProjectImport(ProjectImport pImport)
Description copied from interface:IModelVisitorThis method is used for visiting a ProjectImport.- Parameters:
pImport- One ProjectImport which should be visited.
-
startWritingCompound
protected void startWritingCompound(Compound compound)
Description copied from class:AbstractVarModelWriterMethod for writing a compound, first part.- Specified by:
startWritingCompoundin classAbstractVarModelWriter- Parameters:
compound- The compound which should be saved.
-
endWritingCompound
protected void endWritingCompound(Compound compound)
Description copied from class:AbstractVarModelWriterMethod for writing a compound, second part.- Specified by:
endWritingCompoundin classAbstractVarModelWriter- Parameters:
compound- The compound which should be saved.
-
visitEnum
public void visitEnum(Enum eenum)
Method for visiting an enum.- Specified by:
visitEnumin interfaceICustomDatatypeVisitor- Overrides:
visitEnumin classAbstractVisitor- Parameters:
eenum- The enum which should be visited.
-
visitEnumValue
public void visitEnumValue(EnumValue value)
Description copied from interface:IValueVisitorThis method is used for visiting EnumValue.- Parameters:
value- One EnumValue which should be visited.
-
visitDecisionVariableDeclaration
public void visitDecisionVariableDeclaration(DecisionVariableDeclaration decl)
Description copied from interface:IModelVisitorThis method is used for visiting a decision variable declaration.- Parameters:
decl- One declaration which should be visited.
-
emitDecisionVariableDeclarationExpression
private void emitDecisionVariableDeclarationExpression(DecisionVariableDeclaration decl, ConstraintSyntaxTree defaultValue)
Emits the expression part of a variable declaration without the statement part.- Parameters:
decl- the declaration to be emitteddefaultValue- an explicitly given default value that supersedes the one ofdecl(may be null to force the one given bydecl)
-
emitDecisionVariableDeclarationDefault
protected void emitDecisionVariableDeclarationDefault(DecisionVariableDeclaration decl, ConstraintSyntaxTree defaultValue)
Emits the default value of a decision variable declaration (for extension).- Parameters:
decl- the declarationdefaultValue- the specified default value
-
visitStringValue
public void visitStringValue(StringValue value)
Description copied from interface:IValueVisitorThis method is used for visiting StringValue.- Parameters:
value- One StringValue which should be visited.
-
emitType
private void emitType(IDatatype type, boolean considerValues)
Emits the type of an initializer if required. ConsidersforceCompoundTypes,nestedValuesandnestedExpressions.- Parameters:
type- the actual type of the elementconsiderValues- whethernestedValuesornestedExpressionsshall be considered
-
visitCompoundValue
public void visitCompoundValue(CompoundValue value)
Description copied from interface:IValueVisitorThis method is used for visiting CompoundValue.- Parameters:
value- One CompoundValue which should be visited.
-
visitCompoundRefines
private int visitCompoundRefines(Compound comp, CompoundValue value, int count, java.util.Set<java.lang.String> done)
- Parameters:
comp- the compoundvalue- the compound valuecount- the countdone- already processed (or null)- Returns:
- the aggregated count
-
writeValue
protected boolean writeValue(Value value)
Returns whether a certain value shall be written.- Parameters:
value- the value to be checked- Returns:
trueif the value shall be written,falseelse
-
visitCompoundDecisionVariableContainer
private int visitCompoundDecisionVariableContainer(IDecisionVariableContainer cont, CompoundValue value, int printed, java.util.Set<java.lang.String> done)
Visits a compound decision variable container for output of configuration values.- Parameters:
cont- the containervalue- the container valueprinted- the number of printed elements so fardone- already processed slots (may be null if not relevant, modified as a side effect)- Returns:
- the number of printed elements
-
visitIntValue
public void visitIntValue(IntValue value)
Description copied from interface:IValueVisitorThis method is used for visiting IntValue.- Parameters:
value- One IntValue which should be visited.
-
visitRealValue
public void visitRealValue(RealValue value)
Description copied from interface:IValueVisitorThis method is used for visiting RealValue.- Parameters:
value- One RealValue which should be visited.
-
visitBooleanValue
public void visitBooleanValue(BooleanValue value)
Description copied from interface:IValueVisitorThis method is used for visiting BooleanValue.- Parameters:
value- One BooleanValue which should be visited.
-
visitContainerValue
public void visitContainerValue(ContainerValue value)
Description copied from interface:IValueVisitorThis method is used for visiting ContainerValue.- Parameters:
value- One CompoundValue which should be visited.
-
visitCompoundInitializer
public void visitCompoundInitializer(CompoundInitializer initializer)
Visits a compound initializer.- Parameters:
initializer- the compound initializer node
-
visitContainerInitializer
public void visitContainerInitializer(ContainerInitializer initializer)
Visits a container initializer.- Parameters:
initializer- the container initializer node
-
visitAttribute
public void visitAttribute(Attribute attribute)
Description copied from interface:IModelVisitorMethod for visiting an attribute.- Parameters:
attribute- The attribute which should be visited.
-
visitFreezeBlock
public void visitFreezeBlock(FreezeBlock freeze)
Description copied from interface:IModelVisitorMethod for visiting a freeze block.- Specified by:
visitFreezeBlockin interfaceIModelVisitor- Overrides:
visitFreezeBlockin classAbstractVarModelWriter- Parameters:
freeze- The freeze block which should be visited.
-
visitOperationDefinition
public void visitOperationDefinition(OperationDefinition opdef)
Description copied from interface:IModelVisitorMethod for visiting an operation definition.- Parameters:
opdef- The operation definition which should be visited.
-
visitPartialEvaluationBlock
public void visitPartialEvaluationBlock(PartialEvaluationBlock block)
Description copied from interface:IModelVisitorMethod for visiting a partial evaluation block.- Specified by:
visitPartialEvaluationBlockin interfaceIModelVisitor- Overrides:
visitPartialEvaluationBlockin classAbstractVarModelWriter- Parameters:
block- The partial evaluation block which should be visited.
-
visitProjectInterface
public void visitProjectInterface(ProjectInterface iface)
Description copied from interface:IModelVisitorMethod for visiting a project interface.- Parameters:
iface- The interface which should be visited.
-
visitDerivedDatatype
public void visitDerivedDatatype(DerivedDatatype datatype)
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a derived datatype.- Parameters:
datatype- The datatype which should be visited.
-
visitEnumLiteral
public void visitEnumLiteral(EnumLiteral literal)
Description copied from interface:ICustomDatatypeVisitorMethod for visiting an enum literal.- Parameters:
literal- The literal which should be visited.
-
visitReference
public void visitReference(Reference reference)
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a reference.- Parameters:
reference- The reference which should be visited.
-
visitSequence
public void visitSequence(Sequence sequence)
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a sequence.- Parameters:
sequence- The sequence which should be visited.
-
visitSet
public void visitSet(Set set)
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a set.- Parameters:
set- The set which should be visited.
-
visitReferenceValue
public void visitReferenceValue(ReferenceValue referenceValue)
Description copied from interface:IValueVisitorThis method is used for visiting referenceValue.- Parameters:
referenceValue- One referenceValue which should be visited.
-
needsQualification
private boolean needsQualification(AbstractVariable var)
Determines whether (on-demand) qualification of the givenvaris needed, i.e., whether its qualified name shall be printed out.- Parameters:
var- the variable- Returns:
trueif it needs to be qualified,falseelse
-
needsQualificationThroughContext
private boolean needsQualificationThroughContext(java.lang.Object context, java.lang.String name, AbstractVariable var, boolean exclude)Returns whether the variable namenameofvarneeds qualification within its contextcontext.- Parameters:
context- the context (only considered ifIDecisionVariableContainername- the name of the variable to determine qualification need forvar- the variable itselfexclude- whether this call is intended to exclude (true) the qualification ofvaror whether it shall search for the existence ofnameincontext(false)- Returns:
- whether
varneeds qualification ifexcludeistrueor whethernamewas found incontextifexcludeisfalse
-
visitVariable
public void visitVariable(Variable variable)
Description copied from interface:IConstraintTreeVisitorVisits a variable.- Parameters:
variable- the variable which should be visited
-
visitAnnotationVariable
public void visitAnnotationVariable(AttributeVariable variable)
Description copied from interface:IConstraintTreeVisitorVisits aAttributeVariable.- Parameters:
variable- the attribute variable which should be visited
-
visitParenthesis
public void visitParenthesis(Parenthesis parenthesis)
Description copied from interface:IConstraintTreeVisitorVisits a parenthesis.- Parameters:
parenthesis- the parenthesis which should be visited
-
visitOclFeatureCall
public void visitOclFeatureCall(OCLFeatureCall call)
Description copied from interface:IConstraintTreeVisitorVisits an OCL feature call.- Parameters:
call- the feature call which should be visited
-
appendOCLFeatureCall
protected void appendOCLFeatureCall(OCLFeatureCall call, Operation.FormattingHint hint)
Does the formatting of an OCL feature call and allows for overwriting.- Parameters:
call- the callhint- the formatting hint for the call
-
visitDeferInitExpression
public void visitDeferInitExpression(DeferInitExpression expression)
Description copied from interface:IConstraintTreeVisitorVisits a default init expression.- Parameters:
expression- the expression
-
visitMultiAndExpression
public void visitMultiAndExpression(MultiAndExpression expression)
Description copied from interface:IConstraintTreeVisitorVisits a multi-and expression.- Parameters:
expression- the expression to be visited
-
visitConstraint
public void visitConstraint(Constraint constraint)
Description copied from interface:IModelVisitorMethod for visiting a constraint.- Specified by:
visitConstraintin interfaceIModelVisitor- Overrides:
visitConstraintin classAbstractVarModelWriter- Parameters:
constraint- The constraint which should be visited.
-
visitLet
public void visitLet(Let let)
Description copied from interface:IConstraintTreeVisitorVisits a let expression.- Parameters:
let- the let expression which should be visited
-
visitIfThen
public void visitIfThen(IfThen ifThen)
Description copied from interface:IConstraintTreeVisitorVisits an if-then-else expression.- Parameters:
ifThen- the if-then-else expression which should be visited
-
visitContainerOperationCall
public void visitContainerOperationCall(ContainerOperationCall call)
Description copied from interface:IConstraintTreeVisitorVisits a container operation call (e.g. quantors, iterators).- Parameters:
call- the container operation call
-
visitCompoundAccess
public void visitCompoundAccess(CompoundAccess access)
Description copied from interface:IConstraintTreeVisitorVisits a compound access node.- Parameters:
access- the compound access node
-
visitMetaTypeValue
public void visitMetaTypeValue(MetaTypeValue value)
Description copied from interface:IValueVisitorThis method is used for visiting meta type value.- Parameters:
value- a value which should be visited.
-
visitNullValue
public void visitNullValue(NullValue value)
Description copied from interface:IValueVisitorThis method is used for visiting a null value.- Parameters:
value- a value which should be visited (actuallyNullValue.INSTANCE).
-
visitAttributeAssignment
public void visitAttributeAssignment(AttributeAssignment assignment)
Description copied from interface:IModelVisitorVisits an attribute assignment.- Specified by:
visitAttributeAssignmentin interfaceIModelVisitor- Overrides:
visitAttributeAssignmentin classAbstractVarModelWriter- Parameters:
assignment- the assignment to visit
-
visitComment
public void visitComment(Comment comment)
Description copied from interface:IModelVisitorMethod for visiting a comment.- Parameters:
comment- the comment to visit
-
visitComment
public void visitComment(Comment comment)
Description copied from interface:IConstraintTreeVisitorVisits a comment.- Parameters:
comment- the comment node which should be visited
-
beforeNestedElement
protected void beforeNestedElement(java.lang.Object element)
Description copied from class:AbstractVarModelWriterThis method is called before a nested element is emitted. This enables the output of comments before theelementetc.- Overrides:
beforeNestedElementin classAbstractVarModelWriter- Parameters:
element- the element (no specific type needed, seeComment
-
visitCompound
public void visitCompound(Compound compound)
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a compound.- Specified by:
visitCompoundin interfaceICustomDatatypeVisitor- Overrides:
visitCompoundin classAbstractVarModelWriter- Parameters:
compound- The compound which should be visited.
-
getLastComment
private Comment getLastComment()
Returns the last comment from the internal comment stack.- Returns:
- the last comment
-
dupLastComment
private void dupLastComment()
Duplicates the last comment on the stack for nesting.
-
popLastComment
private Comment popLastComment()
Removes the comment on top of the stack.- Returns:
- the comment which was on the top of the stack before this operation
-
setLastComment
private void setLastComment(Comment comment)
Defines the next comment on top of the stack (combined pop/push).- Parameters:
comment- the new comment to be on the top of the stack
-
visitCompoundAccessStatement
public void visitCompoundAccessStatement(CompoundAccessStatement access)
Description copied from interface:IModelVisitorVisits a compound access statement (may occur in freeze blocks.- Parameters:
access- the access statement
-
visitVersionValue
public void visitVersionValue(VersionValue value)
Description copied from interface:IValueVisitorThis method is used for visiting a version value.- Parameters:
value- a value which should be visited.
-
visitSelf
public void visitSelf(Self self)
Description copied from interface:IConstraintTreeVisitorVisits self.- Parameters:
self- the self object to visit
-
visitBlockExpression
public void visitBlockExpression(BlockExpression block)
Description copied from interface:IConstraintTreeVisitorVisits the block.- Parameters:
block- the block to be visited
-
-