|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.examples.common.utils.EcoreUtils
public class EcoreUtils
Field Summary | |
---|---|
static ILabelGenerator.Registry |
QUALIFIED_NAME_REGISTRY
The global QUALIFIED_NAME_REGISTRY is used by qualifiedNameFor to generate qualified names for objects; typically a :: separted hierarchical name. |
static ILabelGenerator.Registry |
SIMPLE_NAME_REGISTRY
The global SIMPLE_NAME_REGISTRY is used by simpleNameFor to generate simple names for objects; typically the name property. |
Constructor Summary | |
---|---|
EcoreUtils()
|
Method Summary | ||
---|---|---|
static
|
copy(E newObject)
|
|
static java.lang.String |
diagnoseUnresolvedProxies(org.eclipse.emf.common.util.URI contextURI,
java.util.Map<org.eclipse.emf.ecore.EObject,java.util.Collection<org.eclipse.emf.ecore.EStructuralFeature.Setting>> map)
Convert the map return from EcoreUtil.UnresolvedProxyCrossReferencer.find(xx) into a textual diagnosis. |
|
static java.lang.String |
formatMultiplicity(org.eclipse.emf.ecore.ETypedElement typedElement)
|
|
static java.lang.String |
formatOrdered(org.eclipse.emf.ecore.ETypedElement typedElement)
|
|
static java.lang.String |
formatString(java.lang.String name)
|
|
static java.lang.String |
formatUnique(org.eclipse.emf.ecore.ETypedElement typedElement)
|
|
static
|
getAdapter(java.util.List<org.eclipse.emf.common.notify.Adapter> eAdapters,
java.lang.Class<T> adapterClass)
|
|
static
|
getAdapter(org.eclipse.emf.common.notify.Notifier notifier,
java.lang.Class<T> adapterClass)
|
|
static org.eclipse.emf.ecore.EOperation |
getEcoreInvariant(org.eclipse.emf.ecore.EClass eClass,
java.lang.String name)
Return the EOperation that realises the name invariant for eClass. |
|
static org.eclipse.emf.ecore.EClassifier |
getEType(org.eclipse.emf.ecore.EObject sourceObject,
org.eclipse.emf.ecore.EStructuralFeature feature)
Return the specialised value of feature.getEType() resolving any type parameters from the specialised type of the sourceObject of the feature. |
|
static
|
getFeatureID(org.eclipse.emf.common.notify.Notification notification,
T expectedNotifier,
java.lang.Class<T> featureClass)
|
|
static
|
getNamedElement(java.util.Collection<T> elements,
java.lang.String name)
|
|
static
|
getNamedElement(java.util.Collection<T> elements,
java.lang.String name,
java.lang.Class<R> returnClass)
|
|
static java.lang.String |
qualifiedNameFor(java.lang.Object object)
Return a qualified name for object using the label generators registered in the QUALIFIED_NAME_REGISTRY. |
|
static java.lang.String |
simpleNameFor(java.lang.Object object)
Return a simple name for object using the label generators registered in the SIMPLE_NAME_REGISTRY. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@NonNull public static ILabelGenerator.Registry SIMPLE_NAME_REGISTRY
@NonNull public static ILabelGenerator.Registry QUALIFIED_NAME_REGISTRY
Constructor Detail |
---|
public EcoreUtils()
Method Detail |
---|
public static <E extends org.eclipse.emf.ecore.EObject> E copy(E newObject)
@Nullable public static java.lang.String diagnoseUnresolvedProxies(@NonNull org.eclipse.emf.common.util.URI contextURI, @NonNull java.util.Map<org.eclipse.emf.ecore.EObject,java.util.Collection<org.eclipse.emf.ecore.EStructuralFeature.Setting>> map)
@NonNull public static java.lang.String formatMultiplicity(@Nullable org.eclipse.emf.ecore.ETypedElement typedElement)
@NonNull public static java.lang.String formatOrdered(@Nullable org.eclipse.emf.ecore.ETypedElement typedElement)
@NonNull public static java.lang.String formatString(@Nullable java.lang.String name)
@NonNull public static java.lang.String formatUnique(@Nullable org.eclipse.emf.ecore.ETypedElement typedElement)
@Nullable public static <T extends org.eclipse.emf.common.notify.Adapter> T getAdapter(@Nullable org.eclipse.emf.common.notify.Notifier notifier, java.lang.Class<T> adapterClass)
public static <T extends org.eclipse.emf.common.notify.Adapter> T getAdapter(java.util.List<org.eclipse.emf.common.notify.Adapter> eAdapters, java.lang.Class<T> adapterClass)
public static org.eclipse.emf.ecore.EClassifier getEType(org.eclipse.emf.ecore.EObject sourceObject, @NonNull org.eclipse.emf.ecore.EStructuralFeature feature)
sourceObject
- feature
-
@Nullable public static org.eclipse.emf.ecore.EOperation getEcoreInvariant(@NonNull org.eclipse.emf.ecore.EClass eClass, @NonNull java.lang.String name)
eClass
- with invariantname
- of invariant
public static <T> int getFeatureID(@NonNull org.eclipse.emf.common.notify.Notification notification, @Nullable T expectedNotifier, @NonNull java.lang.Class<T> featureClass)
@Nullable public static <T extends org.eclipse.emf.ecore.ENamedElement> T getNamedElement(@Nullable java.util.Collection<T> elements, java.lang.String name)
@Nullable public static <T extends org.eclipse.emf.ecore.ENamedElement,R extends T> R getNamedElement(@Nullable java.util.Collection<T> elements, @Nullable java.lang.String name, @Nullable java.lang.Class<R> returnClass)
@NonNull public static java.lang.String qualifiedNameFor(@Nullable java.lang.Object object)
object
- to be named
@NonNull public static java.lang.String simpleNameFor(@Nullable java.lang.Object object)
object
- to be named
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |