innoQ Logo

com.innoq.generator.metamodel
Interface IMetaModelFacade


public interface IMetaModelFacade


Field Summary
static int FORCE_FD_NAMESPACES
           
static int FORCE_FU_NAMESPACES
           
static int ORIGINAL_NAMESPACES
           
static int VISIBILITY_KIND_PRIVATE
           
static int VISIBILITY_KIND_PROTECTED
           
static int VISIBILITY_KIND_PUBLIC
           
 
Method Summary
 java.util.Collection getAllChildren(ru.novosoft.uml.MBase m)
          Returns all subordinate elements of m.
 java.util.Collection getAllClasses(ru.novosoft.uml.MBase root)
          This method is like getAllClassifier() but returns only the classifier that are interfaces or classes.
 java.util.Collection getAllClassifier(ru.novosoft.uml.MBase root)
          This methods all classifiers (that is interfaces and classes) which are recursively reachable via getChildren() starting from the passed root element.
 java.util.Collection getAllPackages(ru.novosoft.uml.MBase root)
           
 java.util.Collection getAllParameters(ru.novosoft.uml.MBase m)
          Returns all parameters of the passed method including return, in, out, and inout parameter.
 java.util.Collection getAllSuperclasses(ru.novosoft.uml.MBase m)
          Returns all superclasses of model element m.
 java.util.Collection getAssociations(ru.novosoft.uml.MBase m)
          Returns all associations for a passed classifier.
 java.util.Collection getAttributes(ru.novosoft.uml.MBase m)
          returns all attributes of m.
 java.util.Collection getChildren(ru.novosoft.uml.MBase m)
          Returns the subordinate Elements of m.
 java.util.Collection getClassifierOfPackage(ru.novosoft.uml.MBase pPackage)
          This method returns all children of the passed model element m, that are classifier.
 java.util.Collection getComponents(ru.novosoft.uml.MBase m)
          Returns the components, which belong to element m.
 java.util.Collection getConcreteSuperclasses(ru.novosoft.uml.MBase m)
          This method filters all abstract superclasses from the collection returned by getAllSuperclasses()
 java.lang.String getDocumentation(ru.novosoft.uml.MBase m)
           
 java.lang.String getExceptionListAsString(ru.novosoft.uml.MBase m)
          This method returns a Java-compatible String which contains the throws clause for an method declaration.
 java.util.Collection getExceptions(ru.novosoft.uml.MBase m)
          This method returns a collection of all exceptions thrown by the passed method.
 java.lang.String getFQName(ru.novosoft.uml.MBase m)
          Returns the fully qualified name of the passed element.
 java.util.Collection getGeneralizations(ru.novosoft.uml.MBase m)
           
 java.lang.String getId(ru.novosoft.uml.MBase m)
          Returns the elements uuid or null
 java.lang.String getInitialValue(ru.novosoft.uml.MBase m)
          Returns the initial value of an attribute, given as a modelelement.
 java.util.Collection getInterfaces(ru.novosoft.uml.MBase element)
          Returns null
 java.util.Collection getModifiers(ru.novosoft.uml.MBase m)
          Returns a collection of the modifier string representations for model element m.
 int getMultLower(ru.novosoft.uml.MBase m)
          returns the lower value of the multiplicity for association ends or structural features, or -5, if the modelelement is not an association end or a structural feature.
 int getMultLower(ru.novosoft.uml.foundation.data_types.MMultiplicity mult)
          Returns the lower value of the multiplicity or 0, if the multiplicity is null.
 int getMultUpper(ru.novosoft.uml.MBase m)
          returns the upper value of the multiplicity for association ends or structural features, or -5, if the modelelement is not an association end or a structural feature.
 int getMultUpper(ru.novosoft.uml.foundation.data_types.MMultiplicity mult)
          returns the upper value of the multiplicity or 0, if the multiplicity is null.
 java.lang.String getName(ru.novosoft.uml.MBase m)
          This method returns in the name of the pased modelelement m.
 ru.novosoft.uml.MBase getNamespace(ru.novosoft.uml.MBase m)
          Returns the parent namespace for modelelement m.
 java.lang.String getNamespaceName(ru.novosoft.uml.MBase m)
          Returns getNamespaceName( m, '
 java.lang.String getNamespaceName(ru.novosoft.uml.MBase m, char pSeparator)
          Returns getNamespaceName( m, pSeparator, FORCE_FD_NAMESPACES )
 java.lang.String getNamespaceName(ru.novosoft.uml.MBase m, char pSeparator, int mode)
          Returns the fully qualified package name of element m.
 java.util.Collection getOperations(ru.novosoft.uml.MBase m)
          Returns all methods of the passed modelelement including those of the implemented intefaces.
 ru.novosoft.uml.MBase getOppositeEnd(ru.novosoft.uml.MBase m)
           
 java.util.Collection getPackagesFor(ru.novosoft.uml.MBase m)
           
 java.util.Collection getParameterList(ru.novosoft.uml.MBase m)
          Returns all parameters of the passed method excluding the return parameter.
 java.lang.String getParameterListAsString(ru.novosoft.uml.MBase m)
          This methods returns the non-return-parameters in a Java, C, C++ etc. compatible way.
 java.util.Collection getParameterTypeList(ru.novosoft.uml.MBase m)
          Returns a collection of types.
 ru.novosoft.uml.MBase getParent(ru.novosoft.uml.MBase m)
          Returns the element which is containing m.
 java.lang.String getPath(ru.novosoft.uml.MBase m)
          Returns getNamespaceName( m, File.separatorChar, FORCE_FD_NAMESPACES )
 ru.novosoft.uml.foundation.core.MClassifier getReturnType(ru.novosoft.uml.MBase m)
          Returns the return type of the passed method.
 java.lang.String getReturnTypeName(ru.novosoft.uml.MBase m)
          This method returns the name of the return type or "void"
 java.util.Collection getSpecializations(ru.novosoft.uml.MBase m)
           
 java.util.Collection getStaticChildren(ru.novosoft.uml.MBase m)
          Returns the static subordinate elements of m That is, the features for a classifier the ownedElements for a namespace the elementImports for a package the components for all modelelements Consult the OMG-UML-Metamodel-spec to overview the possible parent child relationships.
 java.lang.String getStereotype(ru.novosoft.uml.MBase m)
          This method returns the stereotype of the passed modelelement.
 java.util.Collection getSubclasses(ru.novosoft.uml.MBase m)
          Returns all subclasses of model element m.
 ru.novosoft.uml.MBase getSuperclass(ru.novosoft.uml.MBase m)
          Returns the first superclass returned from getAllSuperclasses().
 ru.novosoft.uml.MBase getTaggedValue(ru.novosoft.uml.MBase m, java.lang.String tag)
          returns the tagged value attached to model element m with name tag.
 java.lang.String getTaggedValueAsString(ru.novosoft.uml.MBase m, java.lang.String tag)
          Returns the string value of the tagged value with tag 'tag' attached to model element m.
 java.util.Collection getTaggedValues(ru.novosoft.uml.MBase m)
          returns all tagged values, which are attached to m.
 ru.novosoft.uml.MBase getType(ru.novosoft.uml.MBase m)
          This method returns the associated type element of the passed model element, or null if getType() is not applicable.
 java.lang.String getTypeName(ru.novosoft.uml.MBase m)
          This method is a shortcut for getName( getType(m) )
 java.lang.String getVisibility(ru.novosoft.uml.MBase m)
          Returns the visibilty of model element m as a string representation.
 int getVisibilityKind(ru.novosoft.uml.MBase m)
          Returns the int mnemonic for the visibility kind of the passed model element.
 boolean isAbstract(ru.novosoft.uml.MBase m)
          Returns true, if m is a metamodel generalizable element object with isAbstract flag set to true.
 boolean isAbstraction(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel abstraction object.
 boolean isActor(ru.novosoft.uml.MBase m)
          Prüft, ob des übergebene Element ein Actor ist
 boolean isAssociation(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel association object.
 boolean isAttribute(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel attribute object.
 boolean isClass(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel class object.
 boolean isComponent(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel component object.
 boolean isDataType(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel datatype object.
 boolean isDependency(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel dependency object.
 boolean isFinal(ru.novosoft.uml.MBase m)
          This method is a shortcut.
 boolean isInterface(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel interface object.
 boolean isNavigable(ru.novosoft.uml.MBase m)
           
 boolean isOperation(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel operation object.
 boolean isPackage(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel package object.
 boolean isParameter(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel parameter object.
 boolean isStatic(ru.novosoft.uml.MBase m)
          Returns true, if m is a metamodel feature object with ownerscope set to classifier.
 boolean isStereotype(ru.novosoft.uml.MBase m)
          Returns true, if m is an metamodel stereotype object.
 boolean isUseCase(ru.novosoft.uml.MBase m)
          Prüft, ob des übergebene Element ein Use Case ist
 

Field Detail

VISIBILITY_KIND_PRIVATE

public static final int VISIBILITY_KIND_PRIVATE
See Also:
Constant Field Values

VISIBILITY_KIND_PROTECTED

public static final int VISIBILITY_KIND_PROTECTED
See Also:
Constant Field Values

VISIBILITY_KIND_PUBLIC

public static final int VISIBILITY_KIND_PUBLIC
See Also:
Constant Field Values

FORCE_FU_NAMESPACES

public static final int FORCE_FU_NAMESPACES
See Also:
Constant Field Values

FORCE_FD_NAMESPACES

public static final int FORCE_FD_NAMESPACES
See Also:
Constant Field Values

ORIGINAL_NAMESPACES

public static final int ORIGINAL_NAMESPACES
See Also:
Constant Field Values
Method Detail

getParent

public ru.novosoft.uml.MBase getParent(ru.novosoft.uml.MBase m)
Returns the element which is containing m.

Parameters:
m - subordinate element
Returns:
superordinate element of m

getChildren

public java.util.Collection getChildren(ru.novosoft.uml.MBase m)
Returns the subordinate Elements of m. It uses getStaticChildren-method to deal with the static portion of the UML. This methods adds the handling for State-Transitions etc., which can be found in State-Transition or Activity-diagrams.
ATTENTION! This implementation might run into an infinite loop, if there were circular links in the model!

Parameters:
m - the superordinate element
Returns:
collection of subordinate elements of m
See Also:
getStaticChildren(MBase)

getStaticChildren

public java.util.Collection getStaticChildren(ru.novosoft.uml.MBase m)
Returns the static subordinate elements of m That is, Consult the OMG-UML-Metamodel-spec to overview the possible parent child relationships. It's guaranteed, that this method returns a Collection, which is not null. But it might be an empty collection.

Parameters:
m - the superordinate element
Returns:
collection of subordinate elements of m, according to m's type
See Also:
getChildren(MBase), getAllChildren(MBase)

getAllChildren

public java.util.Collection getAllChildren(ru.novosoft.uml.MBase m)
Returns all subordinate elements of m. This method is mainly intended for its application in gui-context. it calls getChildren()-method and adds more elements, depending of m's type.

Parameters:
m - superordinate element
Returns:
subordinate element of m
See Also:
getChildren(MBase)

getComponents

public java.util.Collection getComponents(ru.novosoft.uml.MBase m)
Returns the components, which belong to element m. A component in this context is an implementation location of the modelelement.
This method never returns null.

Parameters:
m - - a model element
Returns:
collection of all components which require/contain the element m.

getClassifierOfPackage

public java.util.Collection getClassifierOfPackage(ru.novosoft.uml.MBase pPackage)
This method returns all children of the passed model element m, that are classifier. That means, classes and interfaces of the package are returned. This method does not recursively search for all classifier starting from a given package, but only returns the directly contained classifier.
This method guarantees to return at least an empty collection. It will never return null.

Parameters:
pPackage - - a model element
Returns:
collection of all interfaces and classes of the passed package.

getNamespace

public ru.novosoft.uml.MBase getNamespace(ru.novosoft.uml.MBase m)
Returns the parent namespace for modelelement m. For packages or namespaces this delegates to getParent(). For other modelelements it returns the namespace of m.

Parameters:
m - modelelement
Returns:
the modelelement's namespace object or null, if there is no namespace
See Also:
getNamespaceName(MBase)

getNamespaceName

public java.lang.String getNamespaceName(ru.novosoft.uml.MBase m)
Returns getNamespaceName( m, '.', FORCE_FD_NAMESPACES )

Parameters:
m - modelelement
Returns:
fully qualified namespace name
See Also:
getNamespaceName( MBase, char, int )

getNamespaceName

public java.lang.String getNamespaceName(ru.novosoft.uml.MBase m,
                                         char pSeparator)
Returns getNamespaceName( m, pSeparator, FORCE_FD_NAMESPACES )

Parameters:
m - modelelement
pSeparator - - a separator char
Returns:
fully qualified namespace name
See Also:
getNamespaceName( MBase, char, int )

getPath

public java.lang.String getPath(ru.novosoft.uml.MBase m)
Returns getNamespaceName( m, File.separatorChar, FORCE_FD_NAMESPACES )

Parameters:
m - modelelement
Returns:
fully qualified namespace name
See Also:
getNamespaceName( MBase, char, int )

getNamespaceName

public java.lang.String getNamespaceName(ru.novosoft.uml.MBase m,
                                         char pSeparator,
                                         int mode)
Returns the fully qualified package name of element m. This method separates the single package names with the given separator char. The mode flag understands two modes: *_FU_* means that every package name in the path should start with a capital letter. *_FD_* means, that the path is build with all package names starting with a lower case letter. Any other mode will have no effect, so each package name is inserted into the package path as is.
The namespace name doesn't contain the modelelement's own name.

Parameters:
m - modelelement
pSeparator - the separator character
mode - - see
Returns:
fully qualified namespace name
See Also:
FORCE_FU_NAMESPACES, FORCE_FD_NAMESPACES

getName

public java.lang.String getName(ru.novosoft.uml.MBase m)
This method returns in the name of the pased modelelement m. If the modelelement's type does not have an attribute name, the method wraps this information in a String which contains the element's type.
If m was null, the method returns the String "NULL".

Parameters:
m - Element
Returns:
name of m or a substitute

getGeneralizations

public java.util.Collection getGeneralizations(ru.novosoft.uml.MBase m)
Parameters:
m - modelelement
Returns:
collection of all generalizations, or null if argument was null

getSpecializations

public java.util.Collection getSpecializations(ru.novosoft.uml.MBase m)
Parameters:
m - modelelement
Returns:
collection of all specializations, or null if argument was null

getStereotype

public java.lang.String getStereotype(ru.novosoft.uml.MBase m)
This method returns the stereotype of the passed modelelement. If the element has no stereotype or if it was null, this method returns an empty String.

Parameters:
m - modelelement
Returns:
name of m

getInterfaces

public java.util.Collection getInterfaces(ru.novosoft.uml.MBase element)
Returns null


getFQName

public java.lang.String getFQName(ru.novosoft.uml.MBase m)
Returns the fully qualified name of the passed element. This name is built by getNamespaceName(m) + sep + getName(m).

Parameters:
m - modelelement
Returns:
fully qualified name of m
See Also:
getName(MBase), getNamespaceName(MBase)

getId

public java.lang.String getId(ru.novosoft.uml.MBase m)
Returns the elements uuid or null

Parameters:
m - - the modelelement
Returns:
UUID of m

getInitialValue

public java.lang.String getInitialValue(ru.novosoft.uml.MBase m)
Returns the initial value of an attribute, given as a modelelement.

Parameters:
m - - the modelelement
Returns:
initial value of the attribute or null, if not set or not possible

getDocumentation

public java.lang.String getDocumentation(ru.novosoft.uml.MBase m)
Returns:
constantly: ""

getAllParameters

public java.util.Collection getAllParameters(ru.novosoft.uml.MBase m)
Returns all parameters of the passed method including return, in, out, and inout parameter. If m was not a behavioral feature, this method returns an empty list.

Parameters:
m - Element
Returns:
collection of all parameters, or empty collection

getParameterList

public java.util.Collection getParameterList(ru.novosoft.uml.MBase m)
Returns all parameters of the passed method excluding the return parameter. If m was not a behavioral feature, this method returns an empty list.

Parameters:
m - Element
Returns:
collection of all non-return parameters, or empty collection

getParameterTypeList

public java.util.Collection getParameterTypeList(ru.novosoft.uml.MBase m)
Returns a collection of types. These types correspond to the non-return-parameters. They are returned in the same order they were defined in the model.
This method is like running a transformation on the result of getParameterList(), calling getName( getType() ) on every parameter object in the list.

Parameters:
m - - the modelelement
Returns:
collection of parametertypes, or empty list

getParameterListAsString

public java.lang.String getParameterListAsString(ru.novosoft.uml.MBase m)
This methods returns the non-return-parameters in a Java, C, C++ etc. compatible way. The parameters are written as and are separated with comma.

Parameters:
m - - the modelelement/the behavioral feature
Returns:
the parameter list as a String

getExceptions

public java.util.Collection getExceptions(ru.novosoft.uml.MBase m)
This method returns a collection of all exceptions thrown by the passed method. If the passed argument is not an operation object, this method returns an empty list.

Parameters:
m - - the modelelement/ the operation
Returns:
collection of thrown exceptions

getExceptionListAsString

public java.lang.String getExceptionListAsString(ru.novosoft.uml.MBase m)
This method returns a Java-compatible String which contains the throws clause for an method declaration. If there was at least one Exception in the list, the String starts with the keyword " throws ". Then all the exceptions are listed comma-separated.

Parameters:
m - - the modelelement/ the operation
Returns:
String with the throws-clause, or an empty String

getReturnType

public ru.novosoft.uml.foundation.core.MClassifier getReturnType(ru.novosoft.uml.MBase m)
Returns the return type of the passed method. If the passed argument is not an behavioral feature or the feature has no return type, this method returns null.

Parameters:
m - - the modelelement/the behavioral feature
Returns:
the parameter type

getReturnTypeName

public java.lang.String getReturnTypeName(ru.novosoft.uml.MBase m)
This method returns the name of the return type or "void"

Parameters:
m - - the modelelement/the behavioral element
Returns:
the return type name

getAttributes

public java.util.Collection getAttributes(ru.novosoft.uml.MBase m)
returns all attributes of m.

Parameters:
m - - the modelelement
Returns:
collection of m's attributes

getOperations

public java.util.Collection getOperations(ru.novosoft.uml.MBase m)
Returns all methods of the passed modelelement including those of the implemented intefaces. In future releases also the abstract methods of the superclasses are included as well.
This method never returns null.

Parameters:
m - - the modelelement
Returns:
collection of methods

getAssociations

public java.util.Collection getAssociations(ru.novosoft.uml.MBase m)
Returns all associations for a passed classifier. For anything else it returns an empty list.

Parameters:
m - - the modelelement
Returns:
collection of associations

getMultLower

public int getMultLower(ru.novosoft.uml.foundation.data_types.MMultiplicity mult)
Returns the lower value of the multiplicity or 0, if the multiplicity is null.

Returns:
the lower value

getMultUpper

public int getMultUpper(ru.novosoft.uml.foundation.data_types.MMultiplicity mult)
returns the upper value of the multiplicity or 0, if the multiplicity is null.

Returns:
the upper value

getMultLower

public int getMultLower(ru.novosoft.uml.MBase m)
returns the lower value of the multiplicity for association ends or structural features, or -5, if the modelelement is not an association end or a structural feature.

Parameters:
m - - the multiplicity
Returns:
the lower value

getMultUpper

public int getMultUpper(ru.novosoft.uml.MBase m)
returns the upper value of the multiplicity for association ends or structural features, or -5, if the modelelement is not an association end or a structural feature.

Parameters:
m - - the multiplicity
Returns:
the upper value

getTaggedValues

public java.util.Collection getTaggedValues(ru.novosoft.uml.MBase m)
returns all tagged values, which are attached to m.

Parameters:
m - - the modelelement
Returns:
collection of tagged values

getTaggedValue

public ru.novosoft.uml.MBase getTaggedValue(ru.novosoft.uml.MBase m,
                                            java.lang.String tag)
returns the tagged value attached to model element m with name tag.

Parameters:
m - - the modelelement
tag - name of the tagged value
Returns:
tagged value with tag 'tag' or null

getAllPackages

public java.util.Collection getAllPackages(ru.novosoft.uml.MBase root)

getPackagesFor

public java.util.Collection getPackagesFor(ru.novosoft.uml.MBase m)

getAllClassifier

public java.util.Collection getAllClassifier(ru.novosoft.uml.MBase root)
This methods all classifiers (that is interfaces and classes) which are recursively reachable via getChildren() starting from the passed root element.
Starting with the model, this method will return all classes and interfaces contained in the model.
This method never returns null.

Parameters:
root - - start searching for classifier from this element
Returns:
collection of all classifier

getAllClasses

public java.util.Collection getAllClasses(ru.novosoft.uml.MBase root)
This method is like getAllClassifier() but returns only the classifier that are interfaces or classes.

Parameters:
root - - start searching for classifier from this element
Returns:
collection of all classes and interfaces
See Also:
getAllClassifier(MBase)

getTaggedValueAsString

public java.lang.String getTaggedValueAsString(ru.novosoft.uml.MBase m,
                                               java.lang.String tag)
Returns the string value of the tagged value with tag 'tag' attached to model element m.

Parameters:
m - - the model element
tag - - name of the tag
Returns:
String value of the tag 'tag' or null

isClass

public boolean isClass(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel class object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isAttribute

public boolean isAttribute(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel attribute object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isOperation

public boolean isOperation(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel operation object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isComponent

public boolean isComponent(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel component object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isParameter

public boolean isParameter(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel parameter object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isPackage

public boolean isPackage(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel package object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isInterface

public boolean isInterface(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel interface object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isAbstraction

public boolean isAbstraction(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel abstraction object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isDependency

public boolean isDependency(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel dependency object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isUseCase

public boolean isUseCase(ru.novosoft.uml.MBase m)
Prüft, ob des übergebene Element ein Use Case ist

Parameters:
m - Zu prüfendes Element
Returns:
true, wenn das Element ein Use Case ist

isActor

public boolean isActor(ru.novosoft.uml.MBase m)
Prüft, ob des übergebene Element ein Actor ist

Parameters:
m - Zu prüfendes Element
Returns:
true, wenn das Element ein Actor ist

isStereotype

public boolean isStereotype(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel stereotype object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isDataType

public boolean isDataType(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel datatype object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isAssociation

public boolean isAssociation(ru.novosoft.uml.MBase m)
Returns true, if m is an metamodel association object. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

getType

public ru.novosoft.uml.MBase getType(ru.novosoft.uml.MBase m)
This method returns the associated type element of the passed model element, or null if getType() is not applicable.
This method supports structural features, association ends, and parameters. For those the getType()-method is invoked and its result returned.
If m was a classifier itself, it's returned itself.
Otherwise it returns null.

Parameters:
m - - the model element
Returns:
the corresponding metamodel type element

getTypeName

public java.lang.String getTypeName(ru.novosoft.uml.MBase m)
This method is a shortcut for getName( getType(m) )

Parameters:
m - - the model element
Returns:
the name of the associated type
See Also:
getType(MBase), getName(MBase)

getVisibilityKind

public int getVisibilityKind(ru.novosoft.uml.MBase m)
Returns the int mnemonic for the visibility kind of the passed model element. If there is no visibility defined, this method returns a value less than 0. Otherwise it returns a positive value. The IMetaModelFacade interface declares the following int constants for this purpose:

Parameters:
m - - the model element
Returns:
the visibility kind int mnemonic
See Also:
VISIBILITY_KIND_PRIVATE, VISIBILITY_KIND_PROTECTED, VISIBILITY_KIND_PUBLIC

getVisibility

public java.lang.String getVisibility(ru.novosoft.uml.MBase m)
Returns the visibilty of model element m as a string representation. The mapping is this: Everything else is mapped to an empty String.

Parameters:
m - - the model element
Returns:
the visibility kind string representation

isAbstract

public boolean isAbstract(ru.novosoft.uml.MBase m)
Returns true, if m is a metamodel generalizable element object with isAbstract flag set to true. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isStatic

public boolean isStatic(ru.novosoft.uml.MBase m)
Returns true, if m is a metamodel feature object with ownerscope set to classifier. Otherwise it returns false.

Parameters:
m - - the model element
Returns:
boolean

isFinal

public boolean isFinal(ru.novosoft.uml.MBase m)
This method is a shortcut. It checks whether the passed model element has an attached tagged value named final with value "true".

Parameters:
m - - the model element
Returns:
true, if the model element has tagged value "final" with value "true"

getModifiers

public java.util.Collection getModifiers(ru.novosoft.uml.MBase m)
Returns a collection of the modifier string representations for model element m. For this the methods getVisibility(), isAbstract(), isStatic(), and isFinal() are used.
For abstract model elements it adds "abstract" to the result collection. For static model elements it adds "static" to the result collection. For final elements it adds "final" to the result collection.
This method never returns null.

Parameters:
m - - the model element
Returns:
collection of modifier string representations

getOppositeEnd

public ru.novosoft.uml.MBase getOppositeEnd(ru.novosoft.uml.MBase m)

isNavigable

public boolean isNavigable(ru.novosoft.uml.MBase m)

getSuperclass

public ru.novosoft.uml.MBase getSuperclass(ru.novosoft.uml.MBase m)
Returns the first superclass returned from getAllSuperclasses(). If there is none, this method returns null.

Parameters:
m - - the model element
Returns:
the superclass or null
See Also:
getAllSuperclasses(MBase)

getSubclasses

public java.util.Collection getSubclasses(ru.novosoft.uml.MBase m)
Returns all subclasses of model element m. If m was an interface, only the sub-interfaces are returned.

Parameters:
m - - the model element
Returns:
collection of classes or interfaces, depending on the type of m.

getAllSuperclasses

public java.util.Collection getAllSuperclasses(ru.novosoft.uml.MBase m)
Returns all superclasses of model element m. If m was an interface, this method returns only superinterfaces. If not, this method returns only superclasses.
This method is intended for multi-inheritence languages like C++.

Parameters:
m - - the model element
Returns:
collection of superclasses resp. superinterfaces
See Also:
getGeneralizations(MBase), getSuperclass(MBase)

getConcreteSuperclasses

public java.util.Collection getConcreteSuperclasses(ru.novosoft.uml.MBase m)
This method filters all abstract superclasses from the collection returned by getAllSuperclasses()

Parameters:
m - - the model element
Returns:
collection of concrete superclasses
See Also:
getAllSuperclasses(MBase)

innoQ Logo

iQgen Logo

Copyright © 2001-2004 innoQ GmbH. Alle Rechte vorbehalten. All Rights Reserved.