Class LinkType

java.lang.Object
com.nomagic.magicdraw.uml.symbols.LinkType

@OpenApiAll public class LinkType extends Object
Holds information about a possible relationship - its class and stereotypes. Given this information it is possible to create a relationship and check whether any relationship is of this type.
  • Constructor Details

    • LinkType

      public LinkType(Class clazz, Set<Stereotype> stereotypes)
      Constructs this relationship type.
      Parameters:
      clazz - class of the relationship.
      stereotypes - stereotypes of the relationship.
    • LinkType

      public LinkType(Class clazz)
      Constructs this relationship type.
      Parameters:
      clazz - class of the relationship.
  • Method Details

    • getClazz

      public Class getClazz()
      Gets class of the relationship.
      Returns:
      class of the relationship.
    • getStereotypes

      public Set<Stereotype> getStereotypes()
      Gets stereotypes of the relationship.
      Returns:
      stereotypes of the relationship.
    • create

      public static LinkType create(Element relationship)
      Creates type for a given relationship.
      Parameters:
      relationship - relationship for which to get the type.
      Returns:
      type of the given relationship.
    • isTypeOf

      public boolean isTypeOf(Relationship relationship)
      Checks if given relationship is of this type.
      Parameters:
      relationship - relationship to check.
      Returns:
      true if given relationship is of given type, false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object