Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.poseidon.uml.model_management

Class ModelElementAccessory


public final class ModelElementAccessory

Contains methods that read information from the model and leave it unchanged.


 Attribute Summary
public static final int  ctr
 
public static String  STEREOTYPE_CREATE
 
public static String  STEREOTYPE_UTILITY
 
public static String  STEREOTYPE_SINGLETON
 
arrow_up
 

 Method Summary
public static void   beginTrans()
Unlocks the repository. 
public Collection   classifierGetBehavior( ModelElement cls )
Workaround method for the missing classifier. 
public boolean   doesConflict( Operation operationFromSubclass , Operation operationFromSuperclass )
 
public static void   endTrans()
 
public UmlAssociation   findLinkingAssociation( Classifier source , Classifier target )
 
public Transition   findLinkingTransition( StateVertex source , StateVertex target )
 
public static StateMachine   findStateMachineForState( StateVertex state )
 
public static String   formatNameforCode(String elementName )
Replaces blanks, tabs, and line feeds with underscores; cuts away leading blanks. 
public String   generateJavaPackageName( ModelElement me )
Produces the path to the element, excluding the model, and separating packages with dots. 
public String   generateJavaPackageName_IncludingInnerClasses( ModelElement me )
Produces the path to the element. 
public static String   generateOperationSignature( Operation op )
Generate methods' signature in shortened uml notation, used for tabConstraints. 
public Collection   getAbstractions( Classifier cls )
Finds all abstraction (realization!) connections (egdes, not nodes!!) of this classifier to the implemented interfaces. 
public Collection   getAllArgumentsOfParameter( Parameter param )
Returns all arguments of the given parameter. 
public Collection   getAllClassifiers( Namespace namespace )
Returns all classifiers of the namespace, including inner classifiers  
public Collection   getAllSubtypes( Classifier cls )
 
public Collection   getAllSupertypes( Classifier cls )
This method returns all Classifiers of which this class is a direct or indirect subtype. 
public Collection   getAllSupertypesAndSpecifications( Classifier cls )
Returns all Classifiers of which this class is a direct or indirect subtype or specification. 
public Argument   getArgumentOfParameter( Parameter parameter , Action targetAction )
Returns the actual argument of a parameter within the context of an action  
public Collection   getArguments( Binding bind )
 
public Collection   getAssociateEnds( Classifier classifier )
This method returns all opposite AssociationEnds of a given Classifier  
public Collection   getAssociateEndsInh( Classifier classifier )
This method returns all opposite AssociationEnds of a given Classifier, including inherited. 
public static Collection   getAssociation( Classifier target )
 
public Collection   getAssociationEndClassifiers( UmlAssociation assoc )
Returns a list of all classifiers that are connected with this association. 
public static AssociationRole   getAssociationRole( AssociationEndRole target )
 
public List   getAttributes( Classifier classifier )
This method returns all attributes of a given Classifier. 
public Collection   getAttributesInh( Classifier classifier )
This method returns all attributes of a given Classifier, including inherited. 
public static Collection   getBehavior( ModelElement target )
Finds the StateMachines to a ModelElement. 
public Binding   getBindingOfArgument( Argument argument )
Returns the binding of an argument. 
public Binding   getBindingOfParameter( Parameter param )
Returns the binding of the given parameter. 
public Collection   getBindings( ModelElement element )
Returns the bindings for the given model element. 
public static Collection   getCallAction( Operation target )
Returns all call actions of a given operation  
public Collection   getChildren( GeneralizableElement parent )
Returns all generalizable elements playing the child role, given the parent generalizable element  
public static Collection   getClassifierRole( Classifier target )
 
public String   getConstraintExpression( Constraint constraint )
 
public ModelElement   getContainerElement( ModelElement element )
Get the container of a model element. 
public static Collection   getContext( Signal target )
 
public static String   getDataValue( TaggedValue taggedValue )
Returns data value of tagged value, if there is exactly one data value. 
public static Collection   getElementImport( ModelElement target )
 
public static Collection   getElementResidence( ModelElement target )
 
public ElementResidence   getElementResidence( ModelElement element , Component container )
 
public static Event   getEvent( Parameter target )
 
public static Collection   getExtend( ExtensionPoint target )
Returns the Extend instance that plays the extend role in the ExtensionPoint-Extend association, given the ExtensionPoint instance  
public static Collection   getExtender( UseCase useCase )
 
public Stereotype   getFirstStereotype( ModelElement element )
Returns the first stereotype for the given model element. 
public static Collection   getGeneralization( GeneralizableElement target )
 
public Collection   getImplementations( Classifier classifier )
This method returns all Classifiers that realize this classifier e. 
public Set   getImports( Classifier cls )
 
public static Collection   getIncluder( UseCase useCase )
 
public Collection   getInheritedOperations( Classifier cls )
This method returns all the methods that are inherited from superclasses (not interfaces). 
public Pseudostate   getInitialState( CompositeState compState )
Looks for a initial state in the given composite state. 
public static ModelElementAccessory   getInstance()
Does a double-locking to avoid unneccessary synchronization. 
public static Collection   getInstance( Classifier target )
Returns all instances of a classifier  
public static Class   getInterfaceClass(Class implementationClass )
This method looks up the JMI compliant interface class the given class builds upon. 
public static Collection   getMessage( Action target )
 
public static Collection   getMethod( Operation target )
 
public Method   getMethod( Operation op , String language )
Returns null or the body that has an expression in the given language. 
public String   getMethodBody( Operation op , String language )
Returns "" or the method body for the given language. 
public Model   getModel( ModelElement element )
Returns the model that owns the element, or null. 
public Namespace   getNamespace( ModelElement element )
Returns the namespace of the given element or of the first owning element having a namespace. 
public List   getOperations( Classifier classifier )
This method returns all operations of a given Classifier  
public Collection   getOperationsInh( Classifier classifier )
This method returns all operations of a given Classifier, including inherited  
public AssociationEnd   getOppositeEnd( AssociationEnd thisAssocEnd )
 
public static Collection   getParameter( Event target )
 
public Collection   getParents( GeneralizableElement child )
 
public static Collection   getRaisedSignal( BehavioralFeature target )
 
public Stereotype   getRealizationStereotype()
Returns the stereotype realize. 
public Collection   getRealizations( Classifier cls )
This method returns all Realizations (edges, not nodes!!) for this classifier, e. 
public Parameter   getReturnParameter( Operation operation )
this method finds all paramters of the given operation which have the ParamterDirectionType RETURN. 
public Collection   getSiblings( ModelElement element )
Similar to getcontainerElement, but differs for example with states and transitions  
public Vector   getSourceStates( StateVertex state )
Returns all the states that have got transitions to the state passed as parameter 
public static Collection   getSpecialization( GeneralizableElement target )
 
public Collection   getSpecifications( Classifier cls )
This method returns all Classifiers of which this class is a realization. 
public static Collection   getState( Event target )
 
public static State   getState( Transition target )
 
public static State   getState1( Action target )
Returns the opposite end of an entry action. 
public static State   getState2( Action target )
Returns the opposite end of an exit action. 
public static State   getState3( Action target )
Returns the opposite end of a do action. 
public ModelElement   getStateContainerElement( StateVertex state )
If the state has a containing state, the container state is returned. 
public List   getStates( Classifier cls )
Finds all states in the first StateMachine of the given class. 
public static Collection   getStimulus( Link target )
 
public static Collection   getStimulus( Action target )
 
public static Collection   getStimulus1( Instance target )
Returns the stimuli of the instance-stimulus association where instance playing the argument role  
public static Collection   getStimulus2( Instance target )
Returns the stimuli of the instance-stimulus association, instance playing the sender role  
public static Collection   getStimulus3( Instance target )
Returns the stimulus of the instance-stimulus association, instance playing the receiver role  
public Collection   getSubtypes( GeneralizableElement generalizable )
This method returns all generalizable elements of which this generalizable element is a direct supertype. 
public static Collection   getSupplierDependency( ModelElement target )
 
public static String   getTaggedValue( ModelElement me , String tag )
Returns the first data value element of the first tagged value of given a model element, that has the given tag. 
public static TaggedValue   getTaggedValueType( ModelElement me , String tag )
Returns the first tagged value of given a model element, that has the given tag. 
public Vector   getTargetStates( StateVertex state )
returns all the states that the state passed as parameter has transitions to 
public static Collection   getTemplateArgument( ModelElement element )
 
public List   getThrownExceptions( Operation op )
Retrieves the thrown exceptions. 
public Namespace   getTopLevelNamespace( ModelElement element )
Returns the top-level namepsace of the given element. 
public static Collection   getTransition( Event target )
 
public static Transition   getTransition( Action target )
 
public ModelElement   getTransitionContainerElement( Transition trans )
 
public String   getUMLClassName( ModelElement modelElement )
 
public static String   getUUID( ModelElement element )
 
public static boolean   hasStereotype( ModelElement element , String stereotypeName )
 
public static boolean   isAbstraction( Dependency dep )
True if abstraction with stereotype "realize". 
public static boolean   isCollection(String type )
True iff the given type is the name of a well-known Java collection class like Collection, LinkedList etc. 
public static boolean   isConstructor( Operation op )
True if the operation is a constructor. 
public static boolean   isEqual( ModelElement element , ModelElement equalTo )
 
public boolean   isEqualTrigger( Event trigger1 , Event trigger2 )
 
public static boolean   isEventPartOfInternalTransition( Event umlEvent )
This method takes an event, looks for its transition, and then checks wether the transition is an internal transition. 
public static boolean   isJavaPrimitiveDataType( ModelElement type )
True if the type is a primitive like a char etc. 
public static boolean   isJavaPrimitiveDataTypeName(String name )
True if the parameter is a primitive type name like 'char' etc. 
public final boolean   isModelElementStillValid( ModelElement element )
 
public static boolean   isParentNamespace( ModelElement element , Namespace namespace )
Tests, if the given namespace is amongst the namespaces of the given element. 
public static boolean   isRealization( Dependency dep )
True if abstraction with stereotype "realize". 
public boolean   isResident( ModelElement element , Component container )
Tests, if the given model element is resident for the given component. 
public static boolean   isTopLevelModel( Namespace namespace )
Tests if the given namespace is the top-level model. 
public boolean   isValidConstraint( Constraint constr )
Tests if the constraint has a tagged value "isValid" that says true. 
public ModelElement   lookup( Namespace location , String wanted )
Finds a model element by name in the given namespace. 
public ModelElement   lookup( Namespace location , String wanted , Class elementClass )
Finds a model element by name in the given namespace. 
public ModelElement   lookup( Namespace location , Class elementClass , String wanted )
Finds a model element by name in the given namespace and meta class. 
public UmlAssociation   lookupAssociation( UmlAssociation assoc )
 
public UmlAssociation   lookupAssociationRecursive( Namespace namespace , UmlAssociation assoc )
 
public Comment   lookupComment( Comment comment )
 
public Constraint   lookupConstraint( Constraint constraint )
 
public Dependency   lookupDependency( Dependency dep )
 
public ModelElement   lookupFromProfile(String elementName )
Finds a model element in the default profile. 
public ModelElement   lookupFromProfile( Profile profile , String elementName )
 
public Generalization   lookupGeneralization( Generalization gen )
 
public ModelElement   lookupInnerElementRecursive( Namespace topLocation , String wanted , Class elementClass )
Finds a ModelElement by recursively looking up in the contained namespaces, roughly depth-first. 
public ModelElement   lookupRecursive( Namespace topLocation , String wanted )
Finds a ModelElement by recursively looking up in the contained namespaces, roughly depth-first. 
public ModelElement   lookupRecursive( Namespace topLocation , String wanted , Class elementClass )
 
public TemplateArgument   lookupTemplateArgument( TemplateArgument arg )
 
public Collection   operationGetRaisedSignals( Operation op )
Workaround for the missing getRaisedSignals() in Operation. 
public boolean   signaturesMatch( Operation operation1 , Operation operation2 )
 
arrow_up
 

 

 Attribute Detail

ctr

public static int ctr

 
arrow_up
 
 

STEREOTYPE_CREATE

public static String STEREOTYPE_CREATE

 
arrow_up
 
 

STEREOTYPE_UTILITY

public static String STEREOTYPE_UTILITY

 
arrow_up
 
 

STEREOTYPE_SINGLETON

public static String STEREOTYPE_SINGLETON

 
arrow_up
 

 Method Detail

beginTrans

public static void beginTrans()

Unlocks the repository. 
arrow_up
 
 

classifierGetBehavior

public Collection classifierGetBehavior( ModelElement cls )

Workaround method for the missing classifier.getBehavior() 
arrow_up
 
 

doesConflict

public boolean doesConflict( Operation operationFromSubclass , Operation operationFromSuperclass )

 
arrow_up
 
 

endTrans

public static void endTrans()

 
arrow_up
 
 

findLinkingAssociation

public UmlAssociation findLinkingAssociation( Classifier source , Classifier target )

 
arrow_up
 
 

findLinkingTransition

public Transition findLinkingTransition( StateVertex source , StateVertex target )

 
arrow_up
 
 

findStateMachineForState

public static StateMachine findStateMachineForState( StateVertex state )

 
arrow_up
 
 

formatNameforCode

public static String formatNameforCode(String elementName )

Replaces blanks, tabs, and line feeds with underscores; cuts away leading blanks. Currently, this is an ugly duplication of PreparedElement.getNameAsString. To do it right, one would have to hand over the formatting method from the caller down to addImport(). 
arrow_up
 
 

generateJavaPackageName

public String generateJavaPackageName( ModelElement me )

Produces the path to the element, excluding the model, and separating packages with dots. If the ModelElement is an inner Class ( Classifier "IC" in Classifier "MyClass" in Package "MyPack"), then this method returns only "MyPack". If you need "MyPack.MyClass", use generateJavaPackageName_IncludingInnerClasses()
Returns:
A String signifying the Java path to the element.
 
arrow_up
 
 

generateJavaPackageName_IncludingInnerClasses

public String generateJavaPackageName_IncludingInnerClasses( ModelElement me )

Produces the path to the element. If you supply an inner Class ( Classifier "IC" in Classifier "MyClass" in Package "MyPack", you will get "MyPack.MyClass". If you only want the package, see generateJavaPackageName()
Parameters:
me -
 
arrow_up
 
 

generateOperationSignature

public static String generateOperationSignature( Operation op )

Generate methods' signature in shortened uml notation, used for tabConstraints. Note that this method is not used for the diagrams. Eg, the visibility is missing. 
arrow_up
 
 

getAbstractions

public Collection getAbstractions( Classifier cls )

Finds all abstraction (realization!) connections (egdes, not nodes!!) of this classifier to the implemented interfaces. e.g. if you give me a ClassA which realizes an InterfaceB, then you get the abstraction with the stereotype "realizes" which points from ClassA to InterfaceB Note: Opposite method is getRealizations()
Parameters:
cls - The classifier you want to have the abstractions for.
Returns:
An empty collection or a collection of the Abstractions (type Abstraction).
 
arrow_up
 
 

getAllArgumentsOfParameter

public Collection getAllArgumentsOfParameter( Parameter param )

Returns all arguments of the given parameter. A parameter is connected to a set of arguments over a binding, where it plays the supplier role
Parameters:
param - The parameter
Returns:
The collection of all arguments, may be an empty collection
 
arrow_up
 
 

getAllClassifiers

public Collection getAllClassifiers( Namespace namespace )

Returns all classifiers of the namespace, including inner classifiers
Parameters:
namespace - the namespace you want to have the classifiers for
Returns:
An empty collection or a collection of the found classifiers.
 
arrow_up
 
 

getAllSubtypes

public Collection getAllSubtypes( Classifier cls )

 
arrow_up
 
 

getAllSupertypes

public Collection getAllSupertypes( Classifier cls )

This method returns all Classifiers of which this class is a direct or indirect subtype.
Parameters:
cls - the class you want to have the parents for
Returns:
a collection of the parents, each of which is a
 
arrow_up
 
 

getAllSupertypesAndSpecifications

public Collection getAllSupertypesAndSpecifications( Classifier cls )

Returns all Classifiers of which this class is a direct or indirect subtype or specification.
Parameters:
cls - the class you want to have the parents for
Returns:
a collection of the parents, each of which is a
 
arrow_up
 
 

getArgumentOfParameter

public Argument getArgumentOfParameter( Parameter parameter , Action targetAction )

Returns the actual argument of a parameter within the context of an action
Parameters:
parameter - The parameter
targetAction - The context
Returns:
The argument
 
arrow_up
 
 

getArguments

public Collection getArguments( Binding bind )

 
arrow_up
 
 

getAssociateEnds

public Collection getAssociateEnds( Classifier classifier )

This method returns all opposite AssociationEnds of a given Classifier
Parameters:
classifier - the classifier you want to have the opposite association ends for
Returns:
a collection of the opposite associationends, never null.
 
arrow_up
 
 

getAssociateEndsInh

public Collection getAssociateEndsInh( Classifier classifier )

This method returns all opposite AssociationEnds of a given Classifier, including inherited.
Parameters:
classifier - the classifier you want to have the opposite association ends for.
Returns:
a collection of the opposite associationends, or an empty collection.
 
arrow_up
 
 

getAssociation

public static Collection getAssociation( Classifier target )

 
arrow_up
 
 

getAssociationEndClassifiers

public Collection getAssociationEndClassifiers( UmlAssociation assoc )

Returns a list of all classifiers that are connected with this association. The return value is never null, only an empty collection. 
arrow_up
 
 

getAssociationRole

public static AssociationRole getAssociationRole( AssociationEndRole target )

 
arrow_up
 
 

getAttributes

public List getAttributes( Classifier classifier )

This method returns all attributes of a given Classifier.
Parameters:
classifier - the classifier you want to have the attributes for
Returns:
a collection of the attributes
 
arrow_up
 
 

getAttributesInh

public Collection getAttributesInh( Classifier classifier )

This method returns all attributes of a given Classifier, including inherited. It does not check for private or package visibility- justs returns all of them!
Parameters:
classifier - the classifier you want to have the attributes for
Returns:
a collection of the attributes
 
arrow_up
 
 

getBehavior

public static Collection getBehavior( ModelElement target )

Finds the StateMachines to a ModelElement. 
arrow_up
 
 

getBindingOfArgument

public Binding getBindingOfArgument( Argument argument )

Returns the binding of an argument. The binding is the connection for an argument's action to a parameter. An argument has no or exactly one binding.
Parameters:
argument - The argument
Returns:
The binding of the argument
 
arrow_up
 
 

getBindingOfParameter

public Binding getBindingOfParameter( Parameter param )

Returns the binding of the given parameter. The binding is the connection to the parameters' arguments A paramter can have a set of arguments in different actions.
Parameters:
param - The parameter
 
arrow_up
 
 

getBindings

public Collection getBindings( ModelElement element )

Returns the bindings for the given model element.
Parameters:
element - The model element to examine.
Returns:
Collection of all the bindings for this element
 
arrow_up
 
 

getCallAction

public static Collection getCallAction( Operation target )

Returns all call actions of a given operation
Parameters:
target -
 
arrow_up
 
 

getChildren

public Collection getChildren( GeneralizableElement parent )

Returns all generalizable elements playing the child role, given the parent generalizable element
Parameters:
parent -
 
arrow_up
 
 

getClassifierRole

public static Collection getClassifierRole( Classifier target )

 
arrow_up
 
 

getConstraintExpression

public String getConstraintExpression( Constraint constraint )

 
arrow_up
 
 

getContainerElement

public ModelElement getContainerElement( ModelElement element )

Get the container of a model element. Per default, this is the namespace of a modelelement For some elements specific container elements are used. parent element is returned.
Parameters:
element -
 
arrow_up
 
 

getContext

public static Collection getContext( Signal target )

 
arrow_up
 
 

getDataValue

public static String getDataValue( TaggedValue taggedValue )

Returns data value of tagged value, if there is exactly one data value.
Parameters:
taggedValue -
Returns:
Null or the result String
 
arrow_up
 
 

getElementImport

public static Collection getElementImport( ModelElement target )

 
arrow_up
 
 

getElementResidence

public static Collection getElementResidence( ModelElement target )

 
arrow_up
 
 

getElementResidence

public ElementResidence getElementResidence( ModelElement element , Component container )

 
arrow_up
 
 

getEvent

public static Event getEvent( Parameter target )

 
arrow_up
 
 

getExtend

public static Collection getExtend( ExtensionPoint target )

Returns the Extend instance that plays the extend role in the ExtensionPoint-Extend association, given the ExtensionPoint instance
Parameters:
target -
 
arrow_up
 
 

getExtender

public static Collection getExtender( UseCase useCase )

 
arrow_up
 
 

getFirstStereotype

public Stereotype getFirstStereotype( ModelElement element )

Returns the first stereotype for the given model element. This ensures compatibility to UML 1.3 where only one stereotype is available per model element.
Parameters:
element - The model element to examine.
Returns:
The first stereotype for the given model element.
 
arrow_up
 
 

getGeneralization

public static Collection getGeneralization( GeneralizableElement target )

 
arrow_up
 
 

getImplementations

public Collection getImplementations( Classifier classifier )

This method returns all Classifiers that realize this classifier e.g.: ClassA implements InterfaceB. You give me InterfaceB, and I return ClassA.
Parameters:
classifier - The interface you want to have the classes for.
Returns:
A collection of the Classifiers, or an empty collection.
 
arrow_up
 
 

getImports

public Set getImports( Classifier cls )

 
arrow_up
 
 

getIncluder

public static Collection getIncluder( UseCase useCase )

 
arrow_up
 
 

getInheritedOperations

public Collection getInheritedOperations( Classifier cls )

This method returns all the methods that are inherited from superclasses (not interfaces). This also includes private methods and package methods from different packages.
Parameters:
cls - The class for which we want to know the superclasses
 
arrow_up
 
 

getInitialState

public Pseudostate getInitialState( CompositeState compState )

Looks for a initial state in the given composite state. No recursive lookup in contained composite states. Returns the first initial state in the collection of subvertices. Returns null, if no initial state is found.
Returns:
 
arrow_up
 
 

getInstance

public static ModelElementAccessory getInstance()

Does a double-locking to avoid unneccessary synchronization. 
arrow_up
 
 

getInstance

public static Collection getInstance( Classifier target )

Returns all instances of a classifier
Parameters:
target -
 
arrow_up
 
 

getInterfaceClass

public static Class getInterfaceClass(Class implementationClass )

This method looks up the JMI compliant interface class the given class builds upon.
Parameters:
implementationClass - The implementation class to look the interface class up for.
Returns:
The interface class for the given implementation class or null if no interface class is found.
 
arrow_up
 
 

getMessage

public static Collection getMessage( Action target )

 
arrow_up
 
 

getMethod

public static Collection getMethod( Operation target )

 
arrow_up
 
 

getMethod

public Method getMethod( Operation op , String language )

Returns null or the body that has an expression in the given language.
Parameters:
op - May not be null.
language - May not be null.
 
arrow_up
 
 

getMethodBody

public String getMethodBody( Operation op , String language )

Returns "" or the method body for the given language. 
arrow_up
 
 

getModel

public Model getModel( ModelElement element )

Returns the model that owns the element, or null. 
arrow_up
 
 

getNamespace

public Namespace getNamespace( ModelElement element )

Returns the namespace of the given element or of the first owning element having a namespace.
Parameters:
element - The element to look the namespace up for.
Returns:
The namespace of the element or of its owner.
 
arrow_up
 
 

getOperations

public List getOperations( Classifier classifier )

This method returns all operations of a given Classifier
Parameters:
classifier - the classifier you want to have the operations for
Returns:
a collection of the operations
 
arrow_up
 
 

getOperationsInh

public Collection getOperationsInh( Classifier classifier )

This method returns all operations of a given Classifier, including inherited
Parameters:
classifier - the classifier you want to have the operations for
Returns:
a collection of the operations
 
arrow_up
 
 

getOppositeEnd

public AssociationEnd getOppositeEnd( AssociationEnd thisAssocEnd )

 
arrow_up
 
 

getParameter

public static Collection getParameter( Event target )

 
arrow_up
 
 

getParents

public Collection getParents( GeneralizableElement child )

 
arrow_up
 
 

getRaisedSignal

public static Collection getRaisedSignal( BehavioralFeature target )

 
arrow_up
 
 

getRealizationStereotype

public Stereotype getRealizationStereotype()

Returns the stereotype realize. It is usually retrieved from a) the model, b) the Poseidon-Profile, c) from a factory method. should be moved to better standards repository! 
arrow_up
 
 

getRealizations

public Collection getRealizations( Classifier cls )

This method returns all Realizations (edges, not nodes!!) for this classifier, e.g. the (abstractions with stereotype "realizes") that connect the given interface directly with (realizing classes below that interface) NOTE: The opposite method is getSpecifications(Classifier cls)
Parameters:
cls - the classifier (usually interface) you want to have the realizations for
Returns:
a collection of the Realizations
 
arrow_up
 
 

getReturnParameter

public Parameter getReturnParameter( Operation operation )

this method finds all paramters of the given operation which have the ParamterDirectionType RETURN. If it is only one, it is returned. In case there are no return parameters, null is returned. If there is more than one return parameter, the first of them is returned, but a message is written to log.debug
Parameters:
operation - the operation you want to find the return parameter for
Returns:
If this operation has one or more parameter with Kind: RETURN, this is it, otherwise null
 
arrow_up
 
 

getSiblings

public Collection getSiblings( ModelElement element )

Similar to getcontainerElement, but differs for example with states and transitions
Parameters:
element -
 
arrow_up
 
 

getSourceStates

public Vector getSourceStates( StateVertex state )

Returns all the states that have got transitions to the state passed as parameter 
arrow_up
 
 

getSpecialization

public static Collection getSpecialization( GeneralizableElement target )

 
arrow_up
 
 

getSpecifications

public Collection getSpecifications( Classifier cls )

This method returns all Classifiers of which this class is a realization. e.g.: ClassA implements InterfaceB. You give me ClassA, and I give you InterfaceB Note: opposite method would be getImplementations, not existant yet
Parameters:
cls - The class you want to have the interfaces for.
Returns:
A collection of the Classifiers, or an empty collection.
 
arrow_up
 
 

getState

public static Collection getState( Event target )

 
arrow_up
 
 

getState

public static State getState( Transition target )

 
arrow_up
 
 

getState1

public static State getState1( Action target )

Returns the opposite end of an entry action. 
arrow_up
 
 

getState2

public static State getState2( Action target )

Returns the opposite end of an exit action. 
arrow_up
 
 

getState3

public static State getState3( Action target )

Returns the opposite end of a do action. 
arrow_up
 
 

getStateContainerElement

public ModelElement getStateContainerElement( StateVertex state )

If the state has a containing state, the container state is returned. If the state is toplevel, it only has a hidden composite state. Then the context classifier is returned as the container.
Parameters:
state -
 
arrow_up
 
 

getStates

public List getStates( Classifier cls )

Finds all states in the first StateMachine of the given class.
Returns:
A Collection of State, or an empty collection.
 
arrow_up
 
 

getStimulus

public static Collection getStimulus( Link target )

 
arrow_up
 
 

getStimulus

public static Collection getStimulus( Action target )

 
arrow_up
 
 

getStimulus1

public static Collection getStimulus1( Instance target )

Returns the stimuli of the instance-stimulus association where instance playing the argument role
Parameters:
target - The instance playing the argument role
 
arrow_up
 
 

getStimulus2

public static Collection getStimulus2( Instance target )

Returns the stimuli of the instance-stimulus association, instance playing the sender role
Parameters:
target - The instance playing the sender role
 
arrow_up
 
 

getStimulus3

public static Collection getStimulus3( Instance target )

Returns the stimulus of the instance-stimulus association, instance playing the receiver role
Parameters:
target - The instance playing the receiver role
 
arrow_up
 
 

getSubtypes

public Collection getSubtypes( GeneralizableElement generalizable )

This method returns all generalizable elements of which this generalizable element is a direct supertype.
Parameters:
generalizable - The class you want to have the children for.
 
arrow_up
 
 

getSupplierDependency

public static Collection getSupplierDependency( ModelElement target )

 
arrow_up
 
 

getTaggedValue

public static String getTaggedValue( ModelElement me , String tag )

Returns the first data value element of the first tagged value of given a model element, that has the given tag.
Parameters:
me -
tag -
 
arrow_up
 
 

getTaggedValueType

public static TaggedValue getTaggedValueType( ModelElement me , String tag )

Returns the first tagged value of given a model element, that has the given tag. A tag is the tagType of the associated TagDefinition.
Parameters:
me -
tag -
 
arrow_up
 
 

getTargetStates

public Vector getTargetStates( StateVertex state )

returns all the states that the state passed as parameter has transitions to 
arrow_up
 
 

getTemplateArgument

public static Collection getTemplateArgument( ModelElement element )

 
arrow_up
 
 

getThrownExceptions

public List getThrownExceptions( Operation op )

Retrieves the thrown exceptions.
Returns:
a List of UmlExceptions, or null.
 
arrow_up
 
 

getTopLevelNamespace

public Namespace getTopLevelNamespace( ModelElement element )

Returns the top-level namepsace of the given element. Usually, the top-level namespace is the model itself.
Parameters:
element - The element the top-level namespace is looked for.
Returns:
The top-level namespace or null, if no top-level namespace is found.
 
arrow_up
 
 

getTransition

public static Collection getTransition( Event target )

 
arrow_up
 
 

getTransition

public static Transition getTransition( Action target )

 
arrow_up
 
 

getTransitionContainerElement

public ModelElement getTransitionContainerElement( Transition trans )

 
arrow_up
 
 

getUMLClassName

public String getUMLClassName( ModelElement modelElement )

 
arrow_up
 
 

getUUID

public static String getUUID( ModelElement element )

 
arrow_up
 
 

hasStereotype

public static boolean hasStereotype( ModelElement element , String stereotypeName )

 
arrow_up
 
 

isAbstraction

public static boolean isAbstraction( Dependency dep )

True if abstraction with stereotype "realize".  
arrow_up
 
 

isCollection

public static boolean isCollection(String type )

True iff the given type is the name of a well-known Java collection class like Collection, LinkedList etc. 
arrow_up
 
 

isConstructor

public static boolean isConstructor( Operation op )

True if the operation is a constructor. This is the case if either  
arrow_up
 
 

isEqual

public static boolean isEqual( ModelElement element , ModelElement equalTo )

 
arrow_up
 
 

isEqualTrigger

public boolean isEqualTrigger( Event trigger1 , Event trigger2 )

 
arrow_up
 
 

isEventPartOfInternalTransition

public static boolean isEventPartOfInternalTransition( Event umlEvent )

This method takes an event, looks for its transition, and then checks wether the transition is an internal transition. If so, then return true, otherwise false;
Parameters:
umlEvent -
 
arrow_up
 
 

isJavaPrimitiveDataType

public static boolean isJavaPrimitiveDataType( ModelElement type )

True if the type is a primitive like a char etc. 
arrow_up
 
 

isJavaPrimitiveDataTypeName

public static boolean isJavaPrimitiveDataTypeName(String name )

True if the parameter is a primitive type name like 'char' etc. 
arrow_up
 
 

isModelElementStillValid

public final boolean isModelElementStillValid( ModelElement element )

 
arrow_up
 
 

isParentNamespace

public static boolean isParentNamespace( ModelElement element , Namespace namespace )

Tests, if the given namespace is amongst the namespaces of the given element.
Parameters:
element - The element to be tested.
namespace - The namespace to be tested.
Returns:
True, if namespace is a namespace of element, otherwise false.
 
arrow_up
 
 

isRealization

public static boolean isRealization( Dependency dep )

True if abstraction with stereotype "realize". 
arrow_up
 
 

isResident

public boolean isResident( ModelElement element , Component container )

Tests, if the given model element is resident for the given component.
Parameters:
element - The model element to test.
container - The component to look the residence up for.
Returns:
True, if the model element is resident for the component, otherwise false.
 
arrow_up
 
 

isTopLevelModel

public static boolean isTopLevelModel( Namespace namespace )

Tests if the given namespace is the top-level model.
Parameters:
namespace - The namespace to be tested.
Returns:
True if the namespace is the top-level model, otherwise false.
 
arrow_up
 
 

isValidConstraint

public boolean isValidConstraint( Constraint constr )

Tests if the constraint has a tagged value "isValid" that says true. 
arrow_up
 
 

lookup

public ModelElement lookup( Namespace location , String wanted )

Finds a model element by name in the given namespace.
Returns:
null if not found, the first ModelElement with the given name otherwise.
 
arrow_up
 
 

lookup

public ModelElement lookup( Namespace location , String wanted , Class elementClass )

Finds a model element by name in the given namespace. If a Class is supplier, only those modelelement that are instances of the class are inspected and returned. This can save a lot of time when using this method often.
Returns:
null if not found, the first ModelElement with the given name otherwise.
 
arrow_up
 
 

lookup

public ModelElement lookup( Namespace location , Class elementClass , String wanted )

Finds a model element by name in the given namespace and meta class. /** Finds a model element by name in the given namespace and meta class. It iterates through owned elements, and through features if classifier.
Returns:
null if not found, the first ModelElement with the given name otherwise.
 
arrow_up
 
 

lookupAssociation

public UmlAssociation lookupAssociation( UmlAssociation assoc )

 
arrow_up
 
 

lookupAssociationRecursive

public UmlAssociation lookupAssociationRecursive( Namespace namespace , UmlAssociation assoc )

 
arrow_up
 
 

lookupComment

public Comment lookupComment( Comment comment )

 
arrow_up
 
 

lookupConstraint

public Constraint lookupConstraint( Constraint constraint )

 
arrow_up
 
 

lookupDependency

public Dependency lookupDependency( Dependency dep )

 
arrow_up
 
 

lookupFromProfile

public ModelElement lookupFromProfile(String elementName )

Finds a model element in the default profile. 
arrow_up
 
 

lookupFromProfile

public ModelElement lookupFromProfile( Profile profile , String elementName )

 
arrow_up
 
 

lookupGeneralization

public Generalization lookupGeneralization( Generalization gen )

 
arrow_up
 
 

lookupInnerElementRecursive

public ModelElement lookupInnerElementRecursive( Namespace topLocation , String wanted , Class elementClass )

Finds a ModelElement by recursively looking up in the contained namespaces, roughly depth-first. First, package-qualification is resolved. lookupRecursive for pack1::Foo means: lookup Foo recursively, starting in pack1 that is in topLocation. Then, the namespace, the first state machine, the list of features and (in case of a use case) the list of extension points are inspected. If there is an element matching the name, it is returned. Then, depth-first recursion of all namespaces in the current namespace begins, in the same manner. In the long run, this implementation should be replaced by something searching along the metamodel associations.
Parameters:
topLocation - The namespace where the search starts.
wanted - The name of the desired ModelElement. You may give something like pack1::pack2::MyClassifier.
Returns:
The found ModelElement or null.
 
arrow_up
 
 

lookupRecursive

public ModelElement lookupRecursive( Namespace topLocation , String wanted )

Finds a ModelElement by recursively looking up in the contained namespaces, roughly depth-first. First, package-qualification is resolved. lookupRecursive for pack1::Foo means: lookup Foo recursively, starting in pack1 that is in topLocation. Then, the namespace is inspected. If there is an element matching the name, it is returned. Then, depth-first recursion of all namespaces in the current namespace begins, in the same manner.
Parameters:
topLocation - The namespace where the search starts.
wanted - The name of the desired ModelElement. You may give something like pack1::pack2::MyClassifier.
Returns:
The found ModelElement or null.
 
arrow_up
 
 

lookupRecursive

public ModelElement lookupRecursive( Namespace topLocation , String wanted , Class elementClass )

 
arrow_up
 
 

lookupTemplateArgument

public TemplateArgument lookupTemplateArgument( TemplateArgument arg )

 
arrow_up
 
 

operationGetRaisedSignals

public Collection operationGetRaisedSignals( Operation op )

Workaround for the missing getRaisedSignals() in Operation. 
arrow_up
 
 

signaturesMatch

public boolean signaturesMatch( Operation operation1 , Operation operation2 )

 
arrow_up
 

Created  2003 - 3 - 4

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2001 Gentleware AG, Vogt-Kölln-Str.30, 22527 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.