UML.Semantic.Foundation.ExtensionMechanisms
Class Stereotype

java.lang.Object
  |
  +--UML.Semantic.Foundation.Core.ModelElement
        |
        +--UML.Semantic.Foundation.Core.Namespace
              |
              +--UML.Semantic.Foundation.Core.GeneralizableElement
                    |
                    +--UML.Semantic.Foundation.ExtensionMechanisms.Stereotype
All Implemented Interfaces:
Element, ElementAtt, LinkAtt

public class Stereotype
extends GeneralizableElement

The stereotype concept provides a way of classifying (marking) elements so that they behave in some respects as if they were instances of new “virtual” metamodel constructs. Instances have the same structure (attributes, associations, operations) as a similar non-stereotyped instance of the same kind; the stereotype may specify additional constraints and required tagged values that apply to instances. In addition, a stereotype may be used to indicate a difference in meaning or usage between two elements with identical structure.

In the metamodel, the Stereotype metaclass is a subtype of GeneralizableElement. TaggedValues and Constraints attached to a Stereotype apply to all ModelElements classified by that Stereotype. A stereotype may also specify a geometrical icon to be used for presenting elements with the stereotype

Stereotypes are GeneralizableElements. If a stereotype is a subtype of another stereotype, then it inherits all of the constraints and tagged values from its stereotype supertype and it must apply to the same kind of base class. A stereotype keeps track of the base class to which it may be applied.


Constructor Summary
Stereotype()
           
Stereotype(java.lang.String name)
           
 
Method Summary
 void add(Reference ref)
          Adds an element reference to the stereotype.
 boolean check()
          Checks if well-formedness rules are respected in this model element.
 java.lang.String getBaseClass()
          Gets the base class of this stereotype.
 java.util.Vector getExtendedElement()
          Gets the list of extended elements identifiers.
 java.lang.String getIcon()
          Gets the icon of this classifier.
 void getInfo()
          Gets info on Stereotype.
 void setBaseClass(java.lang.String baseClass)
          Sets the base class for this stereotype.
 void setExtendedElement(java.lang.String ref)
          Adds a reference to the set of extended elements.
 void setIcon(java.lang.String icon)
          Sets an icon for this stereotype.
 
Methods inherited from class UML.Semantic.Foundation.Core.GeneralizableElement
allOwnedElement, allSupertype, getGeneralization, getIsAbstract, getIsLeaf, getIsRoot, getSpecialization, getSupertype, inheritedOwnedElement, inheritedSupertype, setIsAbstract, setIsLeaf, setIsRoot
 
Methods inherited from class UML.Semantic.Foundation.Core.Namespace
add, allContents, allContents, getOwnedElement, subContents
 
Methods inherited from class UML.Semantic.Foundation.Core.ModelElement
add, getBindingList, getConstraintList, getElementType, getErrors, getHref, getId, getIdentification, getIdref, getIndex, getIsOwned, getLabel, getLocator, getName, getNamespace, getNamespaceId, getStereotype, getTemplate, getTemplateParameterList, getTitle, getUuid, getUuidref, getVisibility, getVisibilitySymbol, getWarnings, setElementType, setErrors, setHref, setId, setIdref, setIndex, setIsOwned, setLabel, setName, setNamespace, setTemplate, setTitle, setUuid, setUuidref, setVisibility, setWarnings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stereotype

public Stereotype()

Stereotype

public Stereotype(java.lang.String name)
Method Detail

setIcon

public void setIcon(java.lang.String icon)
Sets an icon for this stereotype.


getIcon

public java.lang.String getIcon()
Gets the icon of this classifier.

Returns:
A string representing icon description.

setBaseClass

public void setBaseClass(java.lang.String baseClass)
Sets the base class for this stereotype.


getBaseClass

public java.lang.String getBaseClass()
Gets the base class of this stereotype.

Returns:
A string indicating a class.

add

public void add(Reference ref)
Adds an element reference to the stereotype. It's used to add extended elements to extended elements vector.

Overrides:
add in class GeneralizableElement

setExtendedElement

public void setExtendedElement(java.lang.String ref)
Adds a reference to the set of extended elements.


getExtendedElement

public java.util.Vector getExtendedElement()
Gets the list of extended elements identifiers.

Returns:
A Vector of identifiers strings.

check

public boolean check()
Checks if well-formedness rules are respected in this model element.

Overrides:
check in class GeneralizableElement
Returns:
True if check was successful, false otherwise.

getInfo

public void getInfo()
Gets info on Stereotype.

Overrides:
getInfo in class GeneralizableElement