org.eclipse.gmt.umlx.ecore2.util
Class Ecore2Utils
java.lang.Object
org.eclipse.gmt.umlx.ecore2.util.Ecore2Utils
public class Ecore2Utils
- extends java.lang.Object
Method Summary |
static E2Attribution |
getActualAttribution(org.eclipse.emf.ecore.EAttribute target)
|
static E2Inheritance |
getActualInheritance(org.eclipse.emf.ecore.EClass source,
org.eclipse.emf.ecore.EClass target)
|
static E2Association |
getAssociation(E2AssociationLinkEnd sourceLinkEnd,
E2AssociationLinkEnd targetLinkEnd)
|
static E2Association |
getAssociation(org.eclipse.emf.ecore.EReference source)
Return the association involving the non-null source reference. |
static E2Association |
getAssociation(org.eclipse.emf.ecore.EReference source,
org.eclipse.emf.ecore.EReference target)
|
static E2DirectedAssociation |
getDirectedAssociation(E2AssociationLinkEnd sourceLinkEnd,
E2AssociationLinkEnd targetLinkEnd)
|
static E2DirectedAssociation |
getDirectedAssociation(org.eclipse.emf.ecore.EReference source,
boolean isReversed)
Return the association involving the source reference and its direction. |
static E2DirectedAssociation |
getDirectedAssociation(org.eclipse.emf.ecore.EReference source,
org.eclipse.emf.ecore.EReference target)
Return the association from non-null source to non-null target and its direction. |
static org.eclipse.emf.ecore.EStructuralFeature |
getFeature(java.lang.Class<? extends org.eclipse.emf.ecore.EObject> javaClass,
java.lang.String featureName)
|
static E2Association |
getNullAssociation()
|
static E2Attribution |
getPotentialAttribution(org.eclipse.emf.ecore.EClass source,
org.eclipse.emf.ecore.EAttribute target)
|
static boolean |
hasSourceReference(E2Direction direction)
|
static boolean |
hasTargetReference(E2Direction direction)
|
static void |
initTreeAdapters()
|
static java.lang.String |
toString(E2Association eAssociation)
|
static java.lang.String |
toString(E2DirectedAssociation eAssociation)
|
static java.lang.String |
toString(java.lang.String sourceName,
E2DirectedAssociation eAssociation,
java.lang.String targetName)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ecore2Model
public static final EModel ecore2Model
Ecore2Utils
public Ecore2Utils()
getActualAttribution
public static E2Attribution getActualAttribution(org.eclipse.emf.ecore.EAttribute target)
getActualInheritance
public static E2Inheritance getActualInheritance(org.eclipse.emf.ecore.EClass source,
org.eclipse.emf.ecore.EClass target)
getAssociation
public static E2Association getAssociation(org.eclipse.emf.ecore.EReference source)
- Return the association involving the non-null source reference.
(The actual direction of an E2Association is determined by the end from
which it is first used and so is an unpredictable accident of construction
and so subsequent usages must be relative to the construction direction).
This method requires source to be part of a model - have
non-null eContainingClass() and eType() to denote the class context.
- Parameters:
source
-
- Returns:
getAssociation
public static E2Association getAssociation(org.eclipse.emf.ecore.EReference source,
org.eclipse.emf.ecore.EReference target)
getAssociation
public static E2Association getAssociation(E2AssociationLinkEnd sourceLinkEnd,
E2AssociationLinkEnd targetLinkEnd)
getDirectedAssociation
public static E2DirectedAssociation getDirectedAssociation(org.eclipse.emf.ecore.EReference source,
boolean isReversed)
- Return the association involving the source reference and its direction.
(The actual direction of an E2Association is determined by the end from
which it is first used and so is an unpredictable accident of construction
and so subsequent usages must be relative to the construction direction).
This method requires source to be part of a model - have
non-null eContainingClass() and eType() to denote the class context.
- Parameters:
source
-
- Returns:
getDirectedAssociation
public static E2DirectedAssociation getDirectedAssociation(E2AssociationLinkEnd sourceLinkEnd,
E2AssociationLinkEnd targetLinkEnd)
getDirectedAssociation
public static E2DirectedAssociation getDirectedAssociation(org.eclipse.emf.ecore.EReference source,
org.eclipse.emf.ecore.EReference target)
- Return the association from non-null source to non-null target and its direction.
(The actual direction of an E2Association is determined by the end from
which it is first used and so is an unpredictable accident of construction
and so subsequent usages must be relative to the construction direction).
This method does not require source or target to be part of a model (have
non-null eContainingClass(), it is sufficient for each eType to denote the
class context.
- Parameters:
source
- target
-
- Returns:
getFeature
public static org.eclipse.emf.ecore.EStructuralFeature getFeature(java.lang.Class<? extends org.eclipse.emf.ecore.EObject> javaClass,
java.lang.String featureName)
getNullAssociation
public static E2Association getNullAssociation()
getPotentialAttribution
public static E2Attribution getPotentialAttribution(org.eclipse.emf.ecore.EClass source,
org.eclipse.emf.ecore.EAttribute target)
hasSourceReference
public static boolean hasSourceReference(E2Direction direction)
hasTargetReference
public static boolean hasTargetReference(E2Direction direction)
initTreeAdapters
public static void initTreeAdapters()
toString
public static java.lang.String toString(E2Association eAssociation)
toString
public static java.lang.String toString(E2DirectedAssociation eAssociation)
toString
public static java.lang.String toString(java.lang.String sourceName,
E2DirectedAssociation eAssociation,
java.lang.String targetName)