Class ComponentDescriptor<T>

    • Constructor Detail

      • ComponentDescriptor

        public ComponentDescriptor​(Class<T> type)
        Creates a new ComponentDescriptor instance.
        Parameters:
        type - the component class.
      • ComponentDescriptor

        public ComponentDescriptor​(Class<T> type,
                                   String version)
        Creates a new ComponentDescriptor instance.
        Parameters:
        type - the component class (cannot benull).
        version - the component version (may be null).
    • Method Detail

      • addAliases

        public void addAliases​(Set<String> aliases)
        Adds new aliases to reference the described component.
        Parameters:
        aliases - the aliases to be added.
      • aliases

        public Set<String> aliases()
        Gets the set of aliases for this component.
        Returns:
        the aliases.
      • className

        public String className()
        Gets the name of the describe component.
        Returns:
        the name.
      • version

        public String version()
        Gets the version of the described component.
        Returns:
        the component version if versioned, otherwise UNKNOWN_VERSION.
      • isVersioned

        public boolean isVersioned()
        Checks whether the described component has a valid versioned.
        Returns:
        true if versioned, otherwise false.
      • type

        public Class<T> type()
        Gets the type of the described component.
        Returns:
        the class of type T.
      • isCloseable

        public boolean isCloseable()
        Checks whether the describe component implement Closeable.
        Returns:
        true if closeable, otherwise false.