Enum ObjectDescriptorRegistry
- java.lang.Object
-
- java.lang.Enum<ObjectDescriptorRegistry>
-
- com._1c.g5.properties.ui.descriptors.ObjectDescriptorRegistry
-
- All Implemented Interfaces:
Serializable
,Comparable<ObjectDescriptorRegistry>
public enum ObjectDescriptorRegistry extends Enum<ObjectDescriptorRegistry>
Registry that keeps successors of theAbstractObjectDescriptor
registered with extension point "com._1c.g5.properties.ui.objectDescriptors".
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The shared singleton instance of object descriptor registry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractObjectDescriptor
getObjectDescriptor(org.eclipse.emf.ecore.EClass eClass, org.eclipse.emf.ecore.EObject object, Object... contexts)
Retrieves anAbstractObjectDescriptor
which corresponds to the providedeClass
and a collection of contexts.static ObjectDescriptorRegistry
valueOf(String name)
Returns the enum constant of this type with the specified name.static ObjectDescriptorRegistry[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException
- if the argument is null
-
getObjectDescriptor
public AbstractObjectDescriptor getObjectDescriptor(org.eclipse.emf.ecore.EClass eClass, org.eclipse.emf.ecore.EObject object, Object... contexts)
Retrieves anAbstractObjectDescriptor
which corresponds to the providedeClass
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
- TheEClass
to get anAbstractObjectDescriptor
for, cannot benull
object
- TheEObject
to get anAbstractObjectDescriptor
for, cannot benull
contexts
- Contexts for descriptor retrieval (may benull
)- Returns:
- An
AbstractObjectDescriptor
instance ornull
if no suitable found
-
-