com.ashridgetech.jamda.uml
Class StandardStereotypeDef

java.lang.Object
  |
  +--com.ashridgetech.jamda.uml.StandardElementDef
        |
        +--com.ashridgetech.jamda.uml.StandardStereotypeDef

public class StandardStereotypeDef
extends StandardElementDef

Defines a standard Stereotype which is required in a Model.

Author:
PBoocock

Constructor Summary
StandardStereotypeDef(java.lang.String name, Model.ElementType base)
          Creates a new instance of StandardStereotypeDef.
StandardStereotypeDef(java.lang.String name, Model.ElementType base, java.lang.Class elementClass)
          Creates a new instance of StandardStereotypeDef
 
Method Summary
protected  ModelElement createElement(Model model)
          Create the element required by this definition in a given Model.
 java.lang.String getDescription()
          Get a description of the element required.
 java.lang.Class getElementClass()
          Get the Class used for the elements to which the Stereotype applies.
 Stereotype getStereotype(Model model)
          Get the Stereotype required by this definition from a given Model.
 java.lang.String getStereotypeName()
          Get the name of the Stereotype required.
 boolean hasElement(Model model)
          Check whether the Stereotype required by this definition is present in a given Model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardStereotypeDef

public StandardStereotypeDef(java.lang.String name,
                             Model.ElementType base,
                             java.lang.Class elementClass)
Creates a new instance of StandardStereotypeDef

Parameters:
name - the name of the Stereotype
base - the type of the element to which the Stereotype applies
elementClass - the Class used for the elements to which the Stereotype applies - may be null to use the standard ModelElement class

StandardStereotypeDef

public StandardStereotypeDef(java.lang.String name,
                             Model.ElementType base)
Creates a new instance of StandardStereotypeDef. The standard ModelElement class is used for the elements to which the Stereotype applies.

Parameters:
name - the name of the Stereotype
base - the type of the element to which the Stereotype applies
Method Detail

getStereotypeName

public java.lang.String getStereotypeName()
Get the name of the Stereotype required.

Returns:
the name

getElementClass

public java.lang.Class getElementClass()
Get the Class used for the elements to which the Stereotype applies.

Returns:
the class - may be null if the standard ModelElement class is to be used

hasElement

public boolean hasElement(Model model)
Check whether the Stereotype required by this definition is present in a given Model.

Specified by:
hasElement in class StandardElementDef
Parameters:
model - the Model in which the check is to be performed
Returns:
true if the Stereotype is present

createElement

protected ModelElement createElement(Model model)
Create the element required by this definition in a given Model.

Specified by:
createElement in class StandardElementDef
Parameters:
model - the Model in which the element is to be created
Returns:
the new ModelElement

getStereotype

public Stereotype getStereotype(Model model)
Get the Stereotype required by this definition from a given Model.

Parameters:
model - the Model in which the Stereotype is to be found
Returns:
the Stereotype

getDescription

public java.lang.String getDescription()
Get a description of the element required.

Specified by:
getDescription in class StandardElementDef
Returns:
the description


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.