Package com.nomagic.uml2.ext.jmi.helpers
Class DeprecatedStereotypesHelper
- java.lang.Object
-
- com.nomagic.uml2.ext.jmi.helpers.DeprecatedTagsHelper
-
- com.nomagic.uml2.ext.jmi.helpers.DeprecatedStereotypesHelper
-
- Direct Known Subclasses:
TagsHelper
@OpenApiAll public class DeprecatedStereotypesHelper extends DeprecatedTagsHelper
Utility class to work with stereotypes. It has only deprecated methods for API compatibility.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INVISIBLE_STEREOTYPE_NAME
Deprecated.static java.lang.String
METAMODEL
Deprecated.
-
Constructor Summary
Constructors Constructor Description DeprecatedStereotypesHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
addStereotypeByString(Element element, java.lang.String stereotype)
Deprecated.static void
addStereotypeByString(Element element, java.lang.String stereotype, java.lang.String profileName)
Deprecated.static void
addStereotypesWithNames(Element element, java.util.Collection<java.lang.String> stereotypesNames)
Deprecated.static java.util.List<Element>
getExtendedElements(Stereotype stereotype)
Deprecated.useStereotypesHelper.getStereotypedElements(Stereotype)
as it has better naming of the methodstatic java.util.Collection<Element>
getExtendedElementsIncludingDerived(Stereotype stereotype)
Deprecated.useStereotypesHelper.getStereotypedElementsIncludingDerived(Stereotype)
as it has better naming of the methodstatic Stereotype
getStereotype(Project project, java.lang.String stereotypeName)
Deprecated.this method returns first found stereotype from the project.static Stereotype
getStereotype(Project project, java.lang.String stereotypeName, java.lang.String profileName)
Deprecated.this method is not suitable when project contains more than one profile with same name but different URI.static java.util.List
getStereotypePropertyValue(Element element, Stereotype stereotype, Property tagDefinition)
Deprecated.static java.util.List
getStereotypePropertyValue(Element element, Stereotype stereotype, Property tagDefinition, boolean calculateDerived)
static boolean
hasExtendedElements(Stereotype stereotype)
Deprecated.useStereotypesHelper.hasStereotypedElements(Stereotype)
as it has better naming of the methodstatic boolean
hasStereotype(Element element, java.lang.String stereotype)
Deprecated.static boolean
hasStereotype(Element element, java.lang.String stereotypeName, java.lang.String profileName)
Deprecated.this method is not suitable when project contains more than one profile with same name but different URI.static boolean
hasStereotypeOrDerived(Element element, java.lang.String stereotypeName)
Deprecated.static boolean
isElementStereotypedBy(Element element, java.lang.String stereotypeName)
Deprecated.static void
removeStereotypeByString(Element element, java.lang.String stereotype)
Deprecated.-
Methods inherited from class com.nomagic.uml2.ext.jmi.helpers.DeprecatedTagsHelper
clearStereotypeProperty, clearStereotypeProperty, getStereotypePropertyFirst, getStereotypePropertyFirst, getStereotypePropertyValue, getStereotypePropertyValue, getStereotypePropertyValueAsString, getStereotypePropertyValueAsString
-
-
-
-
Field Detail
-
INVISIBLE_STEREOTYPE_NAME
@Deprecated public static final java.lang.String INVISIBLE_STEREOTYPE_NAME
Deprecated.Name of invisible stereotype- See Also:
- Constant Field Values
-
METAMODEL
@Deprecated public static final java.lang.String METAMODEL
Deprecated.Name of metamodel stereotype- See Also:
- Constant Field Values
-
-
Method Detail
-
hasStereotype
@Deprecated public static boolean hasStereotype(Element element, java.lang.String stereotypeName, java.lang.String profileName) throws java.lang.IllegalArgumentException
Deprecated.this method is not suitable when project contains more than one profile with same name but different URI. UseStereotypesHelper.hasStereotype(Element, Stereotype)
Checks if element has applied stereotype- Parameters:
element
- element to checkstereotypeName
- stereotype name to checkprofileName
- profile name where reside the stereotype- Returns:
- true if element has applied stereotype with given name
- Throws:
java.lang.IllegalArgumentException
- if element or stereotype or profileName is null
-
addStereotypeByString
@Deprecated public static void addStereotypeByString(Element element, java.lang.String stereotype) throws java.lang.IllegalArgumentException
Deprecated.Applies stereotype on element by name. The default tag values are not created, to create these values useTagsHelper.createDefaultValues(Element, Stereotype, boolean)
.- Parameters:
element
- elementstereotype
- name of stereotype to apply- Throws:
java.lang.IllegalArgumentException
- if element or stereotype is null
-
addStereotypeByString
@Deprecated public static void addStereotypeByString(Element element, java.lang.String stereotype, java.lang.String profileName) throws java.lang.IllegalArgumentException
Deprecated.Applies stereotype on element by name. The default tag values are not created, to create these values useTagsHelper.createDefaultValues(Element, Stereotype, boolean)
.- Parameters:
element
- elementstereotype
- name of stereotype to applyprofileName
- name of profile where reside the stereotype- Throws:
java.lang.IllegalArgumentException
- if element or stereotype pr profileName is null
-
addStereotypesWithNames
@Deprecated public static void addStereotypesWithNames(Element element, @CheckForNull java.util.Collection<java.lang.String> stereotypesNames)
Deprecated.Applies stereotypes for specified element. The default tag values are created for tags with multiplicity lower bound >=1.- Parameters:
element
- element on which stereotypes are appliedstereotypesNames
- stereotype names, collection of String objects
-
removeStereotypeByString
@Deprecated public static void removeStereotypeByString(Element element, java.lang.String stereotype) throws java.lang.IllegalArgumentException
Deprecated.Removes applied stereotype from given element.- Parameters:
element
- elementstereotype
- name of stereotype to remove- Throws:
java.lang.IllegalArgumentException
- if element or stereotype is null
-
hasStereotype
@Deprecated public static boolean hasStereotype(Element element, java.lang.String stereotype)
Deprecated.Checks if element has applied stereotype with given name.- Parameters:
element
- element to checkstereotype
- stereotype name to check- Returns:
- true if element has applied stereotype with given name
-
getStereotype
@Deprecated @CheckForNull public static Stereotype getStereotype(Project project, java.lang.String stereotypeName)
Deprecated.this method returns first found stereotype from the project. It is better to narrow down the search with profile, useStereotypesHelper.getStereotype(Project project, String stereotypeName, Profile profile)
Returns stereotype for given name- Parameters:
project
- projectstereotypeName
- name of stereotype- Returns:
- found stereotype or null
-
getStereotype
@Deprecated @CheckForNull public static Stereotype getStereotype(@CheckForNull Project project, java.lang.String stereotypeName, java.lang.String profileName)
Deprecated.this method is not suitable when project contains more than one profile with same name but different URI. UseStereotypesHelper.getStereotype(Project project, String stereotypeName, Profile profile)
Returns stereotype for given name- Parameters:
project
- project to search for a stereotypestereotypeName
- name of stereotypeprofileName
- profile name- Returns:
- found stereotype or null
-
hasStereotypeOrDerived
@Deprecated public static boolean hasStereotypeOrDerived(Element element, java.lang.String stereotypeName)
Deprecated.Checks if element has assigned given stereotype or derived stereotype from given.- Parameters:
element
- elementstereotypeName
- name of stereotype- Returns:
- boolean true if element is stereotyped by given stereotype
-
isElementStereotypedBy
@Deprecated public static boolean isElementStereotypedBy(Element element, java.lang.String stereotypeName)
Deprecated.Checks if element has assigned given stereotype or derived stereotype from given.- Parameters:
element
- elementstereotypeName
- name of stereotype- Returns:
- boolean true if element is stereotyped by given stereotype
-
getStereotypePropertyValue
@Deprecated public static java.util.List getStereotypePropertyValue(Element element, @CheckForNull Stereotype stereotype, Property tagDefinition)
Deprecated.Gets tagged values as list.- Parameters:
element
- element with applied stereotypestereotype
- stereotypetagDefinition
- tag definition- Returns:
- values
-
getStereotypePropertyValue
@Deprecated public static java.util.List getStereotypePropertyValue(Element element, @CheckForNull Stereotype stereotype, Property tagDefinition, boolean calculateDerived)
Gets tagged values as list.- Parameters:
element
- element with applied stereotypestereotype
- stereotype not used parameter - left here for compatibilitytagDefinition
- propertycalculateDerived
- if to calculate derived property value- Returns:
- values
-
getExtendedElementsIncludingDerived
@Deprecated public static java.util.Collection<Element> getExtendedElementsIncludingDerived(@CheckForNull Stereotype stereotype)
Deprecated.useStereotypesHelper.getStereotypedElementsIncludingDerived(Stereotype)
as it has better naming of the methodReturns all elements stereotyped by stereotype and by stereotypes derived from this stereotype.- Parameters:
stereotype
- stereotype- Returns:
- collection of elements stereotyped by stereotype
-
getExtendedElements
@Deprecated public static java.util.List<Element> getExtendedElements(@CheckForNull Stereotype stereotype)
Deprecated.useStereotypesHelper.getStereotypedElements(Stereotype)
as it has better naming of the methodReturns all elements stereotyped by stereotype- Parameters:
stereotype
- stereotype- Returns:
- list of elements stereotyped by stereotype
-
hasExtendedElements
@Deprecated public static boolean hasExtendedElements(Stereotype stereotype)
Deprecated.useStereotypesHelper.hasStereotypedElements(Stereotype)
as it has better naming of the methodChecks if stereotype has stereotyped elements- Parameters:
stereotype
- stereotype to check- Returns:
- true if stereotype has stereotyped elements
-
-