Class EObjects


  • public final class EObjects
    extends Object
    Utility class to facilitate access or modification of eObjects.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.emf.ecore.EObject createEntry​(String key, Object value, org.eclipse.emf.ecore.EClass type)
      Creates a map entry of type string, string.
      static boolean isContainmentProxy​(com.fasterxml.jackson.databind.DatabindContext ctxt, org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EObject contained)
      Checks that the contained object is in a different resource than it's owner, making it a contained proxy.
      static void setOrAdd​(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EReference reference, Object value)
      Set or add a value to an object reference.
    • Method Detail

      • setOrAdd

        public static void setOrAdd​(org.eclipse.emf.ecore.EObject owner,
                                    org.eclipse.emf.ecore.EReference reference,
                                    Object value)
        Set or add a value to an object reference. The value must be an EObject.
        Parameters:
        owner - EObject owning the reference
        reference - the reference of the value to set
        value - value to set for the reference
      • isContainmentProxy

        public static boolean isContainmentProxy​(com.fasterxml.jackson.databind.DatabindContext ctxt,
                                                 org.eclipse.emf.ecore.EObject owner,
                                                 org.eclipse.emf.ecore.EObject contained)
        Checks that the contained object is in a different resource than it's owner, making it a contained proxy.
        Parameters:
        ctxt - the databind context
        owner - EObject owning the contained object
        contained - contained object to be evaluated
        Returns:
        true if proxy
      • createEntry

        public static org.eclipse.emf.ecore.EObject createEntry​(String key,
                                                                Object value,
                                                                org.eclipse.emf.ecore.EClass type)
        Creates a map entry of type string, string.
        Parameters:
        key - of entry
        value - of entry
        type - of entry
        Returns:
        entry