Class DescriptorRegistry


  • public class DescriptorRegistry
    extends java.lang.Object
    • Constructor Detail

      • DescriptorRegistry

        public DescriptorRegistry()
    • Method Detail

      • withWriteLock

        public static <T> T withWriteLock​(java.util.concurrent.Callable<T> callable)
      • add

        public static void add​(IDescriptorRegistry registry)
        Registers a DescriptorRegistry to a global map.
      • remove

        public static void remove​(DescriptorRegistryId id)
        Unregisters the descriptor registry with the specified id.
      • getDescriptor

        public static Descriptor getDescriptor​(Type type)
        Parameters:
        type - The type of a CI.
        Returns:
        The descriptor of the specified CI type.
      • getDescriptor

        public static Descriptor getDescriptor​(java.lang.String prefixedName)
        Parameters:
        prefixedName - The prefixed type name of a CI.
        Returns:
        The descriptor of the specified CI type.
      • getDescriptor

        public static Descriptor getDescriptor​(java.lang.String prefix,
                                               java.lang.String name)
        Parameters:
        prefix - The prefix of a CI.
        name - The simple name of a CI.
        Returns:
        The descriptor of the specified CI type.
      • getDescriptors

        public static java.util.Collection<Descriptor> getDescriptors()
        Returns:
        A collection of all the registered type descriptors.
      • exists

        public static boolean exists​(Type type)
        Parameters:
        type - The type of a CI.
        Returns:
        Whether the given type can be found in the registry.
      • getSubtypes

        public static java.util.Collection<Type> getSubtypes​(Type supertype)
        Parameters:
        supertype - The super type to search against.
        Returns:
        A collection of subtypes of the given super type.