Package net.ssehub.easy.varModel.model
Class Comment
java.lang.Object
net.ssehub.easy.varModel.model.ModelElement
net.ssehub.easy.varModel.model.ContainableModelElement
net.ssehub.easy.varModel.model.Comment
- All Implemented Interfaces:
IDatatypeVisitable,IModelElement
- Direct Known Subclasses:
StructuredComment
Represents a comment in the source of an IVML file. Instances
of this model element are required to properly restore the input
IVML file (after modifications) by using output iterators. Each
comment consists of its text (may be multiple successive comments
and whitespaces without outer model element in between) and a position
which indicates where in the following model element to attach this
comment to (supported constant definitions are given in this class).
Please note: Currently we realize a simplified model for the comments, i.e. only comments which describe language constructs but not inlined comments within individual language constructs are implemented by this class and by specialized subclasses.
Please note: Currently we realize a simplified model for the comments, i.e. only comments which describe language constructs but not inlined comments within individual language constructs are implemented by this class and by specialized subclasses.
- Author:
- Holger Eichelberger
-
Constructor Summary
ConstructorsConstructorDescriptionComment()Constructor for serialization.Comment(String comment, IModelElement parent) Creates a new comment element. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept method for the visitor.voidassignComment(Object element, Comment comment) Assigns acommentto the given modelelement.getComment(Object element) Returns the comment assigned to the given modelelement.Returns the namespace introduced by this model element.Returns the qualified name of this element.Methods inherited from class net.ssehub.easy.varModel.model.ContainableModelElement
accept, getParent, getProject, getTopLevelParent, isTopLevel, setParentMethods inherited from class net.ssehub.easy.varModel.model.ModelElement
findAttribute, getComment, getName, getUniqueName, isTransparent, propagateAttribute, setComment, setName, toString
-
Constructor Details
-
Comment
Comment()Constructor for serialization. -
Comment
Creates a new comment element.- Parameters:
comment- the comment (to be stored as the "name" of this model element)parent- the model element, in which this specific one is embedded
-
-
Method Details
-
accept
Description copied from interface:IModelElementAccept method for the visitor.- Parameters:
visitor- The visitor, which should process this model element.
-
getComment
Returns the comment assigned to the given modelelement.- Parameters:
element- the element to return the comment for- Returns:
- the assigned comment (or null if none is assigned), null by default
-
assignComment
Assigns acommentto the given modelelement. This method is not implemented.- Parameters:
element- the element to assign the comment tocomment- the comment to assign the element to
-
getNameSpace
Description copied from interface:IModelElementReturns the namespace introduced by this model element.- Specified by:
getNameSpacein interfaceIModelElement- Overrides:
getNameSpacein classContainableModelElement- Returns:
- the namespace introduced by this model element.
-
getQualifiedName
Description copied from interface:IModelElementReturns the qualified name of this element.- Specified by:
getQualifiedNamein interfaceIModelElement- Overrides:
getQualifiedNamein classContainableModelElement- Returns:
- the qualified name
-