Interface Extendable<O>

    • Method Detail

      • addExtension

        <E extends Extension<O>> void addExtension​(Class<? super E> type,
                                                   E extension)
        Add en extension to this extendable object.
        Type Parameters:
        E - the extension type
        Parameters:
        type - the extension class type
        extension - the extension
      • getExtension

        <E extends Extension<O>> E getExtension​(Class<? super E> type)
        Get an extension based on its class type.
        Type Parameters:
        E - the extension type
        Parameters:
        type - the extension class type
        Returns:
        the extension mapped to the class type or null if not found
      • getExtensionByName

        <E extends Extension<O>> E getExtensionByName​(String name)
        Get an extension based on its name.
        Parameters:
        name - the extension name
        Returns:
        the extension mapped to the name or null if not found
      • removeExtension

        <E extends Extension<O>> boolean removeExtension​(Class<E> type)
        Remove an extension based on its class type.
        Type Parameters:
        E - the extension type
        Parameters:
        type - the extension class type
        Returns:
        true if the extension has been removed false if extension has not been found
      • getExtensions

        <E extends Extension<O>> Collection<E> getExtensions()
        Get all extensions associated with this extendable object..
        Returns:
        all extensions associated to this extendable object.
      • getImplementationName

        default String getImplementationName()
        Returns a name that is used to find matching ExtensionAdderProviders when selecting implementations of extensions in newExtension(java.lang.Class<B>). This is meant to be overriden by extendables when multiple implementations exist.
        Returns:
        the name