Package dev.hypera.chameleon.extension
Interface ChameleonExtensionFactory<T extends ChameleonExtension>
-
- Type Parameters:
T- Chameleon extension type.
public interface ChameleonExtensionFactory<T extends ChameleonExtension>Chameleon extension factory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NotNull ChameleonPlatformExtensioncreate(@NotNull String platformId)Create an extension instance for the given platform.default @NotNull Collection<ChameleonExtensionDependency>getDependencies(@NotNull String platformId)Returns the dependencies this extension requires on the given platform.@NotNull Class<T>getType()Returns the class of the Chameleon extension implementation that this factory supports.
-
-
-
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 inPlatform.- 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.
-
-