Class ProfileImplementation

java.lang.Object
com.nomagic.profiles.ProfileImplementation
Direct Known Subclasses:
AnalysisPatternsProfile, BPMN2Profile, DependencyMatrixProfile, MagicDrawProfile, MDCustomizationForRequirements, MDCustomizationForSysMLProfile, ModelTransformationProfile, ReportProfile, SimulationProfile, StandardProfile, SysMLProfile, SysPhSProfile, UAF, UIPrototypingProfile, UPDMProfile, ValidationProfile

@OpenApi public abstract class ProfileImplementation extends Object
Base class for a convenience class generated from a modeled Profile (UML), to allow quick access to profile's elements (Stereotypes, tag Properties, Enumerations, DataTypes)
  • Constructor Details

    • ProfileImplementation

      protected ProfileImplementation(com.nomagic.profiles.ProfileCache cache)
  • Method Details

    • getStereotype

      @CheckForNull public final Stereotype getStereotype(String name)
      It is recommended to avoid directly calling this method, and call method that matches the Stereotype name directly, as a separate method is generated for each Stereotype of the Profile.
      Parameters:
      name - of the Stereotype
      Returns:
      Stereotype from this profile by a given name
    • getDataType

      @CheckForNull public final DataType getDataType(String name)
      It is recommended to avoid directly calling this method, and call method that matches the DataType name directly, as a separate method is generated for each DataType of the Profile.
      Parameters:
      name - of the Stereotype
      Returns:
      Stereotype from this profile by a given name
    • getProfile

      @CheckForNull public final Profile getProfile()
      Returns:
      UML Profile element which is represented by this implementation. Will return null if the Profile is not used/loaded in the currently analyzed Model (Project or Resource)
    • findByRelativeQualifiedName

      @CheckForNull protected <T extends Element> T findByRelativeQualifiedName(String relativeQName, Class<T> type)
    • getCache

      public com.nomagic.profiles.ProfileCache getCache()
      Returns:
      returns profile cache.
    • isTypeOf

      public boolean isTypeOf(Element element, @CheckForNull Stereotype stereotype)
      Returns:
      true if given Element has applied the given stereotype or a stereotype derived from it
    • isTypeOf

      public boolean isTypeOf(Element element, String stereotypeName)
      Returns:
      true if given Element has applied the given stereotype or a stereotype derived from it
    • getAllStereotypes

      public Collection<Stereotype> getAllStereotypes()
      Gets all stereotypes contained within this profile.
      Returns:
      unmodifiable collection containing all stereotypes within this profile.
    • generatedGetAllStereotypes

      protected abstract Collection<Stereotype> generatedGetAllStereotypes()
      Generated method for getting all stereotypes contained within this profile.
      Returns:
      gets all stereotypes contained within this profile.
    • generatedGetAllElementWrappers

      protected abstract Collection<com.nomagic.profiles.ProfileImplementation.ProfileElementWrapper> generatedGetAllElementWrappers()
      Generated method for getting all stereotype wrappers contained within this profile.
      Returns:
      gets all stereotype wrappers contained within this profile.
    • clearCache

      protected void clearCache()
    • valueFromString

      @CheckForNull protected static <E extends Enum<E> & com.nomagic.profiles.ProfileImplementation.TextProvider> E valueFromString(Class<E> enumClass, @CheckForNull Object value)