Package net.ssehub.easy.varModel.model
Class StructuredComment
java.lang.Object
net.ssehub.easy.varModel.model.ModelElement
net.ssehub.easy.varModel.model.ContainableModelElement
net.ssehub.easy.varModel.model.Comment
net.ssehub.easy.varModel.model.StructuredComment
- All Implemented Interfaces:
IDatatypeVisitable,IModelElement
Defines a structured comment which stores relations between nested model
elements of the following model element and the comments stored in this
comment. The comments assigned to the following model element shall therefore
be stored in a structured comment.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for serialization.StructuredComment(String comment, IModelElement parent) Creates a new structured comment element. -
Method Summary
Modifier and TypeMethodDescriptionvoidassignComment(Object element, Comment comment) Assigns acommentto the given modelelement.getComment(Object element) Returns the comment assigned to the given modelelement.Methods inherited from class net.ssehub.easy.varModel.model.Comment
accept, getNameSpace, getQualifiedNameMethods 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
-
Field Details
-
comments
Stores the sub comments.
-
-
Constructor Details
-
StructuredComment
StructuredComment()Constructor for serialization. -
StructuredComment
Creates a new structured 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
-
getComment
Returns the comment assigned to the given modelelement.- Overrides:
getCommentin classComment- Parameters:
element- the element to return the comment for- Returns:
- the assigned comment (or null if none is assigned)
-
assignComment
Assigns acommentto the given modelelement.- Overrides:
assignCommentin classComment- Parameters:
element- the element to assign the comment tocomment- the comment to assign the element to
-