Enum ObjectDescriptorRegistry

    • Enum Constant Detail

      • INSTANCE

        public static final ObjectDescriptorRegistry INSTANCE
        The shared singleton instance of object descriptor registry. Instance is thread-safe.
    • Method Detail

      • values

        public static ObjectDescriptorRegistry[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ObjectDescriptorRegistry c : ObjectDescriptorRegistry.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ObjectDescriptorRegistry valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getObjectDescriptor

        public AbstractObjectDescriptor getObjectDescriptor​(org.eclipse.emf.ecore.EClass eClass,
                                                            org.eclipse.emf.ecore.EObject object,
                                                            Object... contexts)
        Retrieves an AbstractObjectDescriptor which corresponds to the provided eClass and a collection of contexts. If the perfect match fails, it will try to get an object descriptor for direct super-types of eClass. If it also fails, all the other super-types are checked.

        Note If contexts are provided, will first search in the eClass tree for dynamic descriptors, and only then for static descriptors.

        Parameters:
        eClass - The EClass to get an AbstractObjectDescriptor for, cannot be null
        object - The EObject to get an AbstractObjectDescriptor for, cannot be null
        contexts - Contexts for descriptor retrieval (may be null)
        Returns:
        An AbstractObjectDescriptor instance or null if no suitable found