org.eclipse.ocl.examples.pivot.uml
Class UML2Moniker

java.lang.Object
  extended by org.eclipse.emf.ecore.util.Switch<T>
      extended by org.eclipse.emf.ecore.util.EcoreSwitch<java.lang.Object>
          extended by org.eclipse.ocl.examples.pivot.uml.UML2Moniker
All Implemented Interfaces:
PivotConstants

public class UML2Moniker
extends org.eclipse.emf.ecore.util.EcoreSwitch<java.lang.Object>
implements PivotConstants

Ecore2Moniker supports generation of a hierarchically derived moniker for an EModelElement. A moniker provides a unique repeatable readable id.


Field Summary
protected  boolean fullSignature
          Moiniker detail; false for minimal uniqueness (omit template bounds, template parameter declarations, parameter names), true to show everything.
 
Fields inherited from class org.eclipse.emf.ecore.util.EcoreSwitch
modelPackage
 
Fields inherited from interface org.eclipse.ocl.examples.pivot.PivotConstants
ACCUMULATOR_SEPARATOR, ANNOTATED_IMPLICIT_OPPOSITE_LOWER_VALUE, ANNOTATED_IMPLICIT_OPPOSITE_ORDERED, ANNOTATED_IMPLICIT_OPPOSITE_UNIQUE, ANNOTATED_IMPLICIT_OPPOSITE_UPPER_VALUE, ANNOTATION_QUOTE, AS_LIBRARY_ANNOTATION_SOURCE, AS_METAMODEL_ANNOTATION_SOURCE, BINDINGS_PREFIX, COLLECTION_NAVIGATION_OPERATOR, DEFAULT_IMPLICIT_OPPOSITE_LOWER_VALUE, DEFAULT_IMPLICIT_OPPOSITE_ORDERED, DEFAULT_IMPLICIT_OPPOSITE_UNIQUE, DEFAULT_IMPLICIT_OPPOSITE_UPPER_VALUE, DOCUMENTATION_ANNOTATION_KEY, DOCUMENTATION_ANNOTATION_SOURCE, DOT_OCL_AS_FILE_EXTENSION, DUPLICATES_ANNOTATION_SOURCE, GEN_MODEL_URI, GREATER_THAN_OPERATOR, GREATER_THAN_OR_EQUAL_OPERATOR, IMPORT_ANNOTATION_SOURCE, ITERATOR_SEPARATOR, LESS_THAN_OPERATOR, LESS_THAN_OR_EQUAL_OPERATOR, LIBRARY_MONIKER_PREFIX, MESSAGE_ANNOTATION_DETAIL_SUFFIX, MESSAGE_PART_NAME, MONIKER_EXP_CHILD_PREFIX, MONIKER_IF_EXP, MONIKER_INVALID_LITERAL_EXP, MONIKER_LET_EXP, MONIKER_NULL_LITERAL_EXP, MONIKER_OPERATOR_SEPARATOR, MONIKER_OVERFLOW_LIMIT, MONIKER_PART_SEPARATOR, MONIKER_ROOT, MONIKER_ROOT_EXP, MONIKER_SCOPE_SEPARATOR, MONIKER_STRING_LITERAL_EXP, MONIKER_TUPLE_LITERAL_EXP, MONIKER_UNLIMITED_NATURAL_LITERAL_EXP, NULL_MARKER, NULL_ROOT, OBJECT_NAVIGATION_OPERATOR, OCL_AS_FILE_EXTENSION, OCL_LANGUAGE, OCL_NAME, OMG_OCL_ANNOTATION_SOURCE, ORPHANAGE_NAME, ORPHANAGE_PREFIX, ORPHANAGE_URI, OVERFLOW_MARKER, PARAMETER_PREFIX, PARAMETER_SEPARATOR, PARAMETER_SUFFIX, PIVOT_ECORE, PLUGIN_ID, PRECEDENCE_PREFIX, PRIMITIVE_TYPES_URI_PREFIX, REDEFINES_ANNOTATION_SOURCE, roleNames, SEVERITY_PART_NAME, STATUS_PART_NAME, SYSML_ANNOTATION_SOURCE, TEMPLATE_BINDING_PREFIX, TEMPLATE_BINDING_SEPARATOR, TEMPLATE_BINDING_SUFFIX, TEMPLATE_PARAMETER_PREFIX, TEMPLATE_SIGNATURE_PREFIX, TEMPLATE_SIGNATURE_SEPARATOR, TEMPLATE_SIGNATURE_SUFFIX, TUPLE_SIGNATURE_PART_SEPARATOR, TUPLE_SIGNATURE_PREFIX, TUPLE_SIGNATURE_SUFFIX, TUPLE_SIGNATURE_TYPE_SEPARATOR, UNKNOWN_TYPE_TEXT, UNRESOLVED_PROXY_MARKER, WILDCARD_INDICATOR, WILDCARD_NAME
 
Constructor Summary
protected UML2Moniker(boolean fullSignature)
           
 
Method Summary
protected  void append(java.lang.String string)
           
protected  void appendBounds(java.util.List<? extends org.eclipse.emf.ecore.EGenericType> bounds)
           
protected  void appendElement(org.eclipse.emf.ecore.EModelElement eElement)
           
protected  void appendName(org.eclipse.emf.ecore.ENamedElement eNamedElement)
           
protected  void appendParameters(java.util.List<org.eclipse.emf.ecore.EParameter> parameters)
           
protected  void appendParent(org.eclipse.emf.ecore.EObject eElement, java.lang.String parentSeparator)
           
protected  void appendType(org.eclipse.emf.ecore.EGenericType eGenericType)
           
protected  void appendTypeArguments(java.util.List<org.eclipse.emf.ecore.EGenericType> eTypeArguments, java.util.List<org.eclipse.emf.ecore.ETypeParameter> eTypeParameters)
           
protected  void appendTypeParameter(org.eclipse.emf.ecore.ETypeParameter eTypeParameter)
           
protected  void appendTypeParameters(java.util.List<org.eclipse.emf.ecore.ETypeParameter> eTypeParameters)
           
protected  void appendTypes(java.util.List<org.eclipse.emf.ecore.EGenericType> eTypes)
           
 java.lang.Object caseEAnnotation(org.eclipse.emf.ecore.EAnnotation eElement)
           
 java.lang.Object caseEClass(org.eclipse.emf.ecore.EClass eElement)
           
 java.lang.Object caseENamedElement(org.eclipse.emf.ecore.ENamedElement eElement)
           
 java.lang.Object caseEOperation(org.eclipse.emf.ecore.EOperation eElement)
           
 java.lang.Object caseEPackage(org.eclipse.emf.ecore.EPackage eElement)
           
 java.lang.Object caseETypeParameter(org.eclipse.emf.ecore.ETypeParameter eElement)
           
protected  java.lang.Object doInPackageSwitch1(org.eclipse.emf.ecore.EModelElement theEObject)
           
protected  boolean hasEmitted(org.eclipse.emf.ecore.ETypeParameter eTypeParameter)
           
static java.lang.String toSignature(org.eclipse.emf.ecore.EModelElement eElement)
           
 java.lang.String toString()
           
static java.lang.String toString(org.eclipse.emf.ecore.EGenericType eElement)
           
static java.lang.String toString(org.eclipse.emf.ecore.EModelElement eElement)
           
 
Methods inherited from class org.eclipse.emf.ecore.util.EcoreSwitch
caseEAttribute, caseEClassifier, caseEDataType, caseEEnum, caseEEnumLiteral, caseEFactory, caseEGenericType, caseEModelElement, caseEParameter, caseEReference, caseEStringToStringMapEntry, caseEStructuralFeature, caseETypedElement, defaultCase, doSwitch, isSwitchFor
 
Methods inherited from class org.eclipse.emf.ecore.util.Switch
doSwitch, doSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fullSignature

protected boolean fullSignature
Moiniker detail; false for minimal uniqueness (omit template bounds, template parameter declarations, parameter names), true to show everything.

Ecore models (unlike Pivot models) are mutable so the moniker is computed on demand and may change if a name on the hierarchical path changes.

Constructor Detail

UML2Moniker

protected UML2Moniker(boolean fullSignature)
Method Detail

toSignature

public static java.lang.String toSignature(org.eclipse.emf.ecore.EModelElement eElement)

toString

public static java.lang.String toString(org.eclipse.emf.ecore.EModelElement eElement)

toString

public static java.lang.String toString(org.eclipse.emf.ecore.EGenericType eElement)

append

protected void append(java.lang.String string)

appendBounds

protected void appendBounds(java.util.List<? extends org.eclipse.emf.ecore.EGenericType> bounds)

appendElement

protected void appendElement(org.eclipse.emf.ecore.EModelElement eElement)

doInPackageSwitch1

protected java.lang.Object doInPackageSwitch1(org.eclipse.emf.ecore.EModelElement theEObject)

appendName

protected void appendName(org.eclipse.emf.ecore.ENamedElement eNamedElement)

appendParameters

protected void appendParameters(java.util.List<org.eclipse.emf.ecore.EParameter> parameters)

appendParent

protected void appendParent(org.eclipse.emf.ecore.EObject eElement,
                            java.lang.String parentSeparator)

appendType

protected void appendType(org.eclipse.emf.ecore.EGenericType eGenericType)

appendTypeArguments

protected void appendTypeArguments(java.util.List<org.eclipse.emf.ecore.EGenericType> eTypeArguments,
                                   java.util.List<org.eclipse.emf.ecore.ETypeParameter> eTypeParameters)

appendTypeParameter

protected void appendTypeParameter(org.eclipse.emf.ecore.ETypeParameter eTypeParameter)

appendTypeParameters

protected void appendTypeParameters(java.util.List<org.eclipse.emf.ecore.ETypeParameter> eTypeParameters)

appendTypes

protected void appendTypes(java.util.List<org.eclipse.emf.ecore.EGenericType> eTypes)

caseEAnnotation

public java.lang.Object caseEAnnotation(org.eclipse.emf.ecore.EAnnotation eElement)
Overrides:
caseEAnnotation in class org.eclipse.emf.ecore.util.EcoreSwitch<java.lang.Object>

caseEClass

public java.lang.Object caseEClass(org.eclipse.emf.ecore.EClass eElement)
Overrides:
caseEClass in class org.eclipse.emf.ecore.util.EcoreSwitch<java.lang.Object>

caseENamedElement

public java.lang.Object caseENamedElement(org.eclipse.emf.ecore.ENamedElement eElement)
Overrides:
caseENamedElement in class org.eclipse.emf.ecore.util.EcoreSwitch<java.lang.Object>

caseEOperation

public java.lang.Object caseEOperation(org.eclipse.emf.ecore.EOperation eElement)
Overrides:
caseEOperation in class org.eclipse.emf.ecore.util.EcoreSwitch<java.lang.Object>

caseEPackage

public java.lang.Object caseEPackage(org.eclipse.emf.ecore.EPackage eElement)
Overrides:
caseEPackage in class org.eclipse.emf.ecore.util.EcoreSwitch<java.lang.Object>

caseETypeParameter

public java.lang.Object caseETypeParameter(org.eclipse.emf.ecore.ETypeParameter eElement)
Overrides:
caseETypeParameter in class org.eclipse.emf.ecore.util.EcoreSwitch<java.lang.Object>

hasEmitted

protected boolean hasEmitted(org.eclipse.emf.ecore.ETypeParameter eTypeParameter)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object