|
UML | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.topcased.modeler.uml.UMLTools
public final class UMLTools
Class for generic operation
creation : 8 avr. 2005
Method Summary | |
---|---|
static boolean |
compareType(org.eclipse.uml2.uml.Type t1,
org.eclipse.uml2.uml.Type t2)
Compare two types. |
static org.eclipse.uml2.uml.Element |
findRootElement(org.eclipse.uml2.uml.Element elt)
Retrieve the root Element of an UML model that contains a given Element |
static java.lang.String[] |
getAllAvailableTypeNames(java.util.Collection<org.eclipse.uml2.uml.Type> types)
Return an array of type names. |
static java.util.Collection<org.eclipse.uml2.uml.Element> |
getAllAvailableTypes(org.eclipse.uml2.uml.Element element)
Return a collection of all types contained in the model associated to a given element |
static java.util.ArrayList<org.eclipse.uml2.uml.Element> |
getAllObjects(org.eclipse.uml2.uml.Element element,
java.lang.Class clazz)
Search in the given model every occurence of a type |
static java.util.ArrayList<org.eclipse.uml2.uml.Element> |
getAllObjects(org.eclipse.uml2.uml.Package element)
Search in the given model every elements |
static java.lang.String |
getCompleteName(org.eclipse.uml2.uml.Element elem)
Return the complete name, ie with the owner names |
static org.eclipse.uml2.uml.NamedElement |
getElementFromPath(org.eclipse.uml2.uml.Model root,
java.lang.String completePath)
Return the element correspong to the specified path. |
static java.lang.String |
getFromPackageNotation(org.eclipse.uml2.uml.Element element,
org.eclipse.uml2.uml.Element parent)
Get a string representation of all the applied stereoptypes on the given UML2 element. |
static java.lang.String |
getMultiplicityNotation(int lowerBound,
int upperBound)
Return a representation for a given multiplicity |
static java.lang.String |
getStereotypesNotation(org.eclipse.uml2.uml.Element uml2Element)
Deprecated. Use the method declared in the org.topcased.modeler.uml.UMLLabel class |
static java.lang.String |
getStringValue(org.eclipse.uml2.uml.ValueSpecification valueSpec)
Return the string representation of the ValueSpecification |
static java.lang.String |
getTypeFullName(org.eclipse.uml2.uml.Type type)
Customized type name |
static java.lang.String |
getVisibilityNotation(org.eclipse.uml2.uml.VisibilityKind visibility)
Deprecated. Use the method declared in the org.topcased.modeler.uml.UMLLabel class |
static void |
initializePrimitiveTypes(org.eclipse.uml2.uml.Model model)
if primitive types do not exist, create them |
static boolean |
isPrimitiveType(org.eclipse.uml2.uml.Type type,
java.lang.String primitiv)
Test if the type is a primitive type with the right name |
static boolean |
isPrimitiveTypeBoolean(org.eclipse.uml2.uml.Type type)
Test if the type is a boolean primitive type |
static boolean |
isPrimitiveTypeInteger(org.eclipse.uml2.uml.Type type)
Test if the type is a integer primitive type |
static boolean |
isPrimitiveTypeString(org.eclipse.uml2.uml.Type type)
Test if the type is a string primitive type |
static java.util.ArrayList<org.eclipse.uml2.uml.Element> |
removeRelationship(java.util.Collection<org.eclipse.uml2.uml.Element> c)
Remove the relation ships from the collection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getCompleteName(org.eclipse.uml2.uml.Element elem)
elem
- the element
public static org.eclipse.uml2.uml.NamedElement getElementFromPath(org.eclipse.uml2.uml.Model root, java.lang.String completePath)
root
- the UML2 root elementcompletePath
- the path of the element
public static void initializePrimitiveTypes(org.eclipse.uml2.uml.Model model)
model
- current edited modelpublic static java.util.Collection<org.eclipse.uml2.uml.Element> getAllAvailableTypes(org.eclipse.uml2.uml.Element element)
element
- the element
public static java.util.ArrayList<org.eclipse.uml2.uml.Element> getAllObjects(org.eclipse.uml2.uml.Package element)
element
- the element to search in
public static java.util.ArrayList<org.eclipse.uml2.uml.Element> getAllObjects(org.eclipse.uml2.uml.Element element, java.lang.Class clazz)
element
- the element to search inclazz
- the wanted type
public static org.eclipse.uml2.uml.Element findRootElement(org.eclipse.uml2.uml.Element elt)
elt
- an Element in the model
public static java.util.ArrayList<org.eclipse.uml2.uml.Element> removeRelationship(java.util.Collection<org.eclipse.uml2.uml.Element> c)
c
- the collection to filter
public static java.lang.String getTypeFullName(org.eclipse.uml2.uml.Type type)
type
- type to customize name
public static java.lang.String[] getAllAvailableTypeNames(java.util.Collection<org.eclipse.uml2.uml.Type> types)
types
- a Collection of Type
getAllAvailableTypes(Element)
public static java.lang.String getVisibilityNotation(org.eclipse.uml2.uml.VisibilityKind visibility)
visibility
- the visibily
public static java.lang.String getMultiplicityNotation(int lowerBound, int upperBound)
lowerBound
- the lower bound of the multiplicityupperBound
- the upper bound of the multiplicity
public static java.lang.String getStereotypesNotation(org.eclipse.uml2.uml.Element uml2Element)
uml2Element
- an UML2 element
public static java.lang.String getFromPackageNotation(org.eclipse.uml2.uml.Element element, org.eclipse.uml2.uml.Element parent)
element
- an UML2 elementparent
- the element which graphically contains the UML2 Type element
public static java.lang.String getStringValue(org.eclipse.uml2.uml.ValueSpecification valueSpec)
valueSpec
- the ValueSpecification
public static boolean compareType(org.eclipse.uml2.uml.Type t1, org.eclipse.uml2.uml.Type t2)
t1
- first type to comparet2
- second type to compare
public static boolean isPrimitiveType(org.eclipse.uml2.uml.Type type, java.lang.String primitiv)
type
- type to testprimitiv
- the name of the primitiv name to cast
public static boolean isPrimitiveTypeInteger(org.eclipse.uml2.uml.Type type)
type
- type to test
public static boolean isPrimitiveTypeBoolean(org.eclipse.uml2.uml.Type type)
type
- type to test
public static boolean isPrimitiveTypeString(org.eclipse.uml2.uml.Type type)
type
- type to test
|
UML | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.