Interface ChameleonExtensionFactory<T extends ChameleonExtension>

  • Type Parameters:
    T - Chameleon extension type.

    public interface ChameleonExtensionFactory<T extends ChameleonExtension>
    Chameleon extension factory.
    • Method Detail

      • create

        @NotNull
        @NotNull ChameleonPlatformExtension create​(@NotNull
                                                   @NotNull String platformId)
                                            throws ChameleonExtensionException
        Create an extension instance for the given platform.

        Note that the returned ChameleonPlatformExtension must implement T.

        Parameters:
        platformId - Platform identifier to create the extension for. This identifier can be compared against known platform identifiers stored as constants in Platform.
        Returns:
        new extension instance.
        Throws:
        ChameleonExtensionException - if something goes wrong while creating the extension.
      • getDependencies

        @NotNull
        default @NotNull Collection<ChameleonExtensionDependency> getDependencies​(@NotNull
                                                                                  @NotNull String platformId)
        Returns the dependencies this extension requires on the given platform.
        Parameters:
        platformId - Platform identifier.
        Returns:
        collection of dependencies.
      • getType

        @NotNull
        @NotNull Class<T> getType()
        Returns the class of the Chameleon extension implementation that this factory supports.
        Returns:
        Chameleon extension class.