|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.uml2.common.util.UML2Util
Nested Class Summary | |
---|---|
static interface |
UML2Util.Converter
|
static class |
UML2Util.EClassMatcher
|
static interface |
UML2Util.EObjectMatcher
|
static class |
UML2Util.EStructuralFeatureMatcher
|
static class |
UML2Util.QualifiedTextProvider
|
Field Summary | |
---|---|
protected static URIConverter |
DEFAULT_URI_CONVERTER
The default URI converter for resource bundle look-ups. |
static java.lang.String |
EMPTY_STRING
The empty string. |
protected static java.lang.String |
LINE_SEPARATOR
The platform line separator. |
static java.lang.String |
PROPERTIES_FILE_EXTENSION
The standard extension for properties files. |
protected static java.util.Map |
RESOURCE_BUNDLES
A cache of resource bundles. |
static java.lang.String |
URI_SCHEME_PLATFORM
The scheme for platform URIs. |
static java.lang.String |
URI_SEGMENT_PLUGIN
The first segment for platform plugin URIs. |
static java.lang.String |
URI_SEGMENT_RESOURCE
The first segment for platform resource URIs. |
Constructor Summary | |
---|---|
protected |
UML2Util()
|
Method Summary | |
---|---|
protected static boolean |
addConstraint(EModelElement eModelElement,
java.lang.String constraint)
|
protected static void |
addDocumentation(EModelElement eModelElement,
java.lang.String text)
|
static EAnnotation |
createEAnnotation(EModelElement eModelElement,
java.lang.String source)
|
protected static void |
destroy(EObject eObject)
|
protected static void |
destroyAll(java.util.Collection eObjects)
|
static EObject |
findEObject(java.util.Collection eObjects,
UML2Util.EObjectMatcher filter)
|
static EObject |
findEObject(java.util.Iterator iterator,
UML2Util.EObjectMatcher filter)
|
static TreeIterator |
getAllContents(EObject eObject,
boolean includeRoot,
boolean defensiveCopy)
|
protected static EClassifier |
getCommonEType(EClassifier eType,
EClassifier otherEType)
|
static EAnnotation |
getEAnnotation(EModelElement eModelElement,
java.lang.String source,
boolean createOnDemand)
|
protected static int |
getGreaterUpperBound(int upperBound,
int otherUpperBound)
|
static int |
getInstanceCount(java.util.Iterator iterator,
EClassifier eClassifier)
|
static java.util.Collection |
getInverseReferences(EObject eObject)
|
protected static int |
getLesserLowerBound(int lowerBound,
int otherLowerBound)
|
protected static java.lang.String |
getMessageSubstitution(java.util.Map context,
java.lang.Object object)
|
protected static java.lang.Object[] |
getMessageSubstitutions(java.util.Map context,
java.lang.Object object0)
|
protected static java.lang.Object[] |
getMessageSubstitutions(java.util.Map context,
java.lang.Object object0,
java.lang.Object object1)
|
protected static java.lang.Object[] |
getMessageSubstitutions(java.util.Map context,
java.lang.Object object0,
java.lang.Object object1,
java.lang.Object object2)
|
static java.util.Collection |
getNonNavigableInverseReferences(EObject eObject)
|
static java.lang.String |
getQualifiedText(EObject eObject,
UML2Util.QualifiedTextProvider qualifiedTextProvider)
|
protected static java.lang.StringBuffer |
getQualifiedText(EObject eObject,
UML2Util.QualifiedTextProvider qualifiedTextProvider,
java.lang.StringBuffer qualifiedText)
|
protected static java.lang.StringBuffer |
getQualifiedTextSegment(EObject eObject,
UML2Util.QualifiedTextProvider qualifiedTextProvider,
java.lang.StringBuffer qualifiedText)
|
protected static java.util.ResourceBundle |
getResourceBundle(EObject eObject,
boolean localize)
Retrieves the (cached) resource bundle for the specified object, localized in the default locale if indicated. |
protected static java.util.ResourceBundle |
getResourceBundle(EObject eObject,
java.util.Locale locale)
Retrieves the (cached) resource bundle for the specified object in the specified locale (if specified). |
protected static java.util.List |
getResourceBundleURIs(URI uri,
java.util.Locale locale)
Retrieves the candidate resource bundle URIs for the specified URI in the specified locale (if specified). |
protected static java.util.List |
getResourceBundleURIs(URI baseURI,
java.util.Locale locale,
java.lang.String baseSegment)
Retrieves the candidate resource bundle URIs based on the specified base URI and base segment in the specified locale. |
protected static java.util.Collection |
getRootContainers(java.util.Collection eObjects)
|
protected static java.lang.String |
getString(EObject eObject,
java.lang.String key,
java.lang.String defaultString,
boolean localize)
Retrieves a string for the specified object, localized if indicated. |
static java.lang.String |
getValidJavaIdentifier(java.lang.String name)
Obtains a valid Java identifier based on the specified name. |
protected static java.lang.StringBuffer |
getValidJavaIdentifier(java.lang.String name,
java.lang.StringBuffer validJavaIdentifier)
Appends a valid Java identifier based on the specified name to the specified buffer. |
protected static java.lang.String |
getValidNCName(java.lang.String name)
|
protected static java.lang.StringBuffer |
getValidNCName(java.lang.String name,
java.lang.StringBuffer validNCName)
|
static java.lang.String |
getXMIIdentifier(InternalEObject internalEObject)
|
protected static java.lang.StringBuffer |
getXMIIdentifier(InternalEObject internalEObject,
java.lang.StringBuffer xmiIdentifier)
|
protected static boolean |
intersect(java.util.Collection collection,
java.util.Collection otherCollection)
|
static boolean |
isEmpty(java.lang.String string)
|
protected static boolean |
isNCNamePart(char c)
|
protected static boolean |
isNCNameStart(char c)
|
static java.lang.Object |
load(ResourceSet resourceSet,
URI uri,
EClass eClass)
|
static boolean |
safeEquals(java.lang.Object object,
java.lang.Object otherObject)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final URIConverter DEFAULT_URI_CONVERTER
protected static final java.util.Map RESOURCE_BUNDLES
public static final java.lang.String EMPTY_STRING
protected static final java.lang.String LINE_SEPARATOR
public static final java.lang.String URI_SCHEME_PLATFORM
public static final java.lang.String URI_SEGMENT_PLUGIN
public static final java.lang.String URI_SEGMENT_RESOURCE
public static final java.lang.String PROPERTIES_FILE_EXTENSION
Constructor Detail |
protected UML2Util()
Method Detail |
protected static java.util.List getResourceBundleURIs(URI baseURI, java.util.Locale locale, java.lang.String baseSegment)
baseURI
- The base URI (i.e. without the last segment) for the candidate
resource bundle URIs.locale
- The locale within which to base the candidate resource bundle
URIs.baseSegment
- The base segment (i.e. the last segment without the extension)
for the candidate resource bundle URIs.
protected static java.util.List getResourceBundleURIs(URI uri, java.util.Locale locale)
uri
- The URI upon which to base the candidate resource bundle URIs.locale
- The locale within which to base the candidate resource bundle
URIs, or null
.
protected static java.util.ResourceBundle getResourceBundle(EObject eObject, java.util.Locale locale)
eObject
- The object for which to retrieve the resource bundle.locale
- The locale in which to retrieve the resource bundle, or
null
.
protected static java.util.ResourceBundle getResourceBundle(EObject eObject, boolean localize)
eObject
- The object for which to retrieve the resource bundle.localize
- Whether to retrieve the resource bundle based on (the default)
locale.
protected static java.lang.String getString(EObject eObject, java.lang.String key, java.lang.String defaultString, boolean localize)
key
- The key in the resource bundle.defaultString
- The string to return if no string for the given key can be
found.localize
- Whether the string should be localized.
public static java.lang.String getQualifiedText(EObject eObject, UML2Util.QualifiedTextProvider qualifiedTextProvider)
protected static java.lang.StringBuffer getQualifiedText(EObject eObject, UML2Util.QualifiedTextProvider qualifiedTextProvider, java.lang.StringBuffer qualifiedText)
protected static java.lang.StringBuffer getQualifiedTextSegment(EObject eObject, UML2Util.QualifiedTextProvider qualifiedTextProvider, java.lang.StringBuffer qualifiedText)
protected static java.lang.String getMessageSubstitution(java.util.Map context, java.lang.Object object)
protected static java.lang.Object[] getMessageSubstitutions(java.util.Map context, java.lang.Object object0)
protected static java.lang.Object[] getMessageSubstitutions(java.util.Map context, java.lang.Object object0, java.lang.Object object1)
protected static java.lang.Object[] getMessageSubstitutions(java.util.Map context, java.lang.Object object0, java.lang.Object object1, java.lang.Object object2)
public static boolean safeEquals(java.lang.Object object, java.lang.Object otherObject)
public static boolean isEmpty(java.lang.String string)
public static EObject findEObject(java.util.Collection eObjects, UML2Util.EObjectMatcher filter)
public static EObject findEObject(java.util.Iterator iterator, UML2Util.EObjectMatcher filter)
protected static EClassifier getCommonEType(EClassifier eType, EClassifier otherEType)
protected static int getLesserLowerBound(int lowerBound, int otherLowerBound)
protected static int getGreaterUpperBound(int upperBound, int otherUpperBound)
public static java.lang.String getValidJavaIdentifier(java.lang.String name)
name
- The name from which to obtain a valid identifier.
protected static java.lang.StringBuffer getValidJavaIdentifier(java.lang.String name, java.lang.StringBuffer validJavaIdentifier)
name
- The name from which to obtain the valid identifier.validJavaIdentifier
- The buffer to which to append the valid identifier.
protected static boolean isNCNameStart(char c)
protected static boolean isNCNamePart(char c)
protected static java.lang.String getValidNCName(java.lang.String name)
protected static java.lang.StringBuffer getValidNCName(java.lang.String name, java.lang.StringBuffer validNCName)
public static java.lang.String getXMIIdentifier(InternalEObject internalEObject)
protected static java.lang.StringBuffer getXMIIdentifier(InternalEObject internalEObject, java.lang.StringBuffer xmiIdentifier)
public static int getInstanceCount(java.util.Iterator iterator, EClassifier eClassifier)
protected static boolean addConstraint(EModelElement eModelElement, java.lang.String constraint)
protected static void addDocumentation(EModelElement eModelElement, java.lang.String text)
protected static java.util.Collection getRootContainers(java.util.Collection eObjects)
public static TreeIterator getAllContents(EObject eObject, boolean includeRoot, boolean defensiveCopy)
public static EAnnotation createEAnnotation(EModelElement eModelElement, java.lang.String source)
public static EAnnotation getEAnnotation(EModelElement eModelElement, java.lang.String source, boolean createOnDemand)
public static java.util.Collection getNonNavigableInverseReferences(EObject eObject)
public static java.util.Collection getInverseReferences(EObject eObject)
protected static void destroy(EObject eObject)
protected static void destroyAll(java.util.Collection eObjects)
public static java.lang.Object load(ResourceSet resourceSet, URI uri, EClass eClass)
protected static boolean intersect(java.util.Collection collection, java.util.Collection otherCollection)
|
Copyright 2003, 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |