Class StructuredComment

All Implemented Interfaces:
IDatatypeVisitable, IModelElement

public class StructuredComment extends Comment
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 Details

  • Constructor Details

    • StructuredComment

      StructuredComment()
      Constructor for serialization.
    • StructuredComment

      public StructuredComment(String comment, IModelElement parent)
      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

      public Comment getComment(Object element)
      Returns the comment assigned to the given model element.
      Overrides:
      getComment in class Comment
      Parameters:
      element - the element to return the comment for
      Returns:
      the assigned comment (or null if none is assigned)
    • assignComment

      public void assignComment(Object element, Comment comment)
      Assigns a comment to the given model element.
      Overrides:
      assignComment in class Comment
      Parameters:
      element - the element to assign the comment to
      comment - the comment to assign the element to