Class UUIDIdGenerator

  • All Implemented Interfaces:
    EMFIdGenerator

    public class UUIDIdGenerator
    extends java.lang.Object
    implements EMFIdGenerator
    An ID generator that creates UUIDs for elements. It is ensured that each element only gets a single unique ID during one session. However, the IDs are not persisted as part of the model by default so they may not be stable across several resource loadings.
    • Constructor Summary

      Constructors 
      Constructor Description
      UUIDIdGenerator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getOrCreateId​(org.eclipse.emf.ecore.EObject element)
      Returns a unique identifier for the given element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UUIDIdGenerator

        public UUIDIdGenerator()
    • Method Detail

      • getOrCreateId

        public java.lang.String getOrCreateId​(org.eclipse.emf.ecore.EObject element)
        Description copied from interface: EMFIdGenerator
        Returns a unique identifier for the given element. The same element must always return the same id and should not conflict with other elements.
        Specified by:
        getOrCreateId in interface EMFIdGenerator
        Parameters:
        element - source element
        Returns:
        unique ID