|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.uml2.common.util.UML2Util org.eclipse.uml2.uml.util.UMLUtil org.eclipse.ocl.uml.util.OCLUMLUtil
public class OCLUMLUtil
Utilities for resolving references to packages against a resource set and finding the Ecore definitions of UML packages and classifiers in support of evaluation of OCL expressions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.uml2.uml.util.UMLUtil |
---|
UMLUtil.Ecore2UMLConverter, UMLUtil.PackageMerger, UMLUtil.Profile2EPackageConverter, UMLUtil.QualifiedTextProvider, UMLUtil.UML2EcoreConverter |
Nested classes/interfaces inherited from class org.eclipse.uml2.common.util.UML2Util |
---|
UML2Util.Converter, UML2Util.EClassMatcher, UML2Util.EObjectMatcher, UML2Util.EStructuralFeatureMatcher |
Field Summary |
---|
Fields inherited from class org.eclipse.uml2.common.util.UML2Util |
---|
DEFAULT_URI_CONVERTER, EMPTY_STRING, LINE_SEPARATOR, PROPERTIES_FILE_EXTENSION, RESOURCE_BUNDLES, URI_SCHEME_PLATFORM, URI_SEGMENT_PLUGIN, URI_SEGMENT_RESOURCE |
Method Summary | |
---|---|
static Namespace |
findNamespace(List<String> qualifiedName,
ResourceSet rset)
Searches the specified resource set for a UML namespace (not necessarily a package). |
protected static EPackage |
findPackage(List<String> packageNames,
EPackage.Registry registry)
Looks in the given registry for a package with the specified qualified package name. |
static Package |
findPackage(List<String> packageNames,
ResourceSet rset)
Searches the specified resource set for a UML package. |
static EList<Property> |
getAllAttributes(Classifier classifier)
A foreign method for the Classifier that obtains all attributes
regardless of visibility, for OCL purposes. |
static EList<Operation> |
getAllOperations(Classifier classifier)
A foreign method for the Classifier that obtains all operations
regardless of visibility, for OCL purposes. |
static List<Reception> |
getAllReceptions(Class clazz)
Foreign method for the getAllReceptions() query that is missing from the UML metamodel. |
static Classifier |
getClassifier(EClassifier eclassifier,
ResourceSet rset)
Obtains the UML classifier corresponding to the specified Ecore classifier, which is the type of some object in an OCL expression evaluation. |
static EClassifier |
getEClassifier(Classifier umlClassifier,
Object element,
EPackage.Registry registry)
Looks up the Ecore definition of the specified UML classifier, using the specified element as a context for finding profile
applications in the case that the classifier is a stereotype or some
other type in a Profile . |
static EPackage |
getEPackage(Package pkg,
EPackage.Registry registry)
Searches the specified package registry set for an Ecore definition of the specified UML package. |
static Class |
getMetaclass(Element element)
Obtains the UML metaclass of the specified model element. |
static Package |
getUMLMetamodel(ResourceSet resourceSet)
Obtains the UML metamodel library loaded in the specified resource set, loading it if necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static List<Reception> getAllReceptions(Class clazz)
clazz
- a UML class
public static Class getMetaclass(Element element)
element
- an element in a UML model
null
if the element is
not in a resource setpublic static Classifier getClassifier(EClassifier eclassifier, ResourceSet rset)
eclassifier
- an Ecore definition of a UML classifierrset
- the resource set in which to look for the corresponding UML
classifier
null
if not foundpublic static Package findPackage(List<String> packageNames, ResourceSet rset)
packageNames
- the qualified package namerset
- the resource set to search
null
if not foundpublic static Namespace findNamespace(List<String> qualifiedName, ResourceSet rset)
qualifiedName
- the qualified namespace namerset
- the resource set to search
null
if not foundpublic static EPackage getEPackage(Package pkg, EPackage.Registry registry)
pkg
- the UML packageregistry
- the registry in which to look for the Ecore definition
null
if not foundpublic static EClassifier getEClassifier(Classifier umlClassifier, Object element, EPackage.Registry registry)
element
as a context for finding profile
applications in the case that the classifier is a stereotype or some
other type in a Profile
. Finding the Ecore definition of a profile
type requires finding the actual applied version of the profile.
umlClassifier
- a UML classifierelement
- an element in the context of which the OCL evaluation
is being performedregistry
- the package registry in which to search for the Ecore
definition
null
if not
foundprotected static EPackage findPackage(List<String> packageNames, EPackage.Registry registry)
packageNames
- the qualified package name
null
if not foundpublic static Package getUMLMetamodel(ResourceSet resourceSet)
resourceSet
- a resource set
public static EList<Property> getAllAttributes(Classifier classifier)
Classifier
that obtains all attributes
regardless of visibility, for OCL purposes.
classifier
- a classifier
public static EList<Operation> getAllOperations(Classifier classifier)
Classifier
that obtains all operations
regardless of visibility, for OCL purposes.
classifier
- a classifier
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |