Interface ArtifactModifier

  • All Known Implementing Classes:
    AccessWidenerModifier

    public interface ArtifactModifier
    Some sort of operation that can be performed on a jar, via a Renamer.
    • Method Detail

      • decorateArtifactId

        static java.lang.String decorateArtifactId​(java.lang.String originalId,
                                                   java.util.Set<ArtifactModifier> modifiers)
      • key

        java.lang.String key()
        A short (1-3 character) identifier for this type of artifact transformation.
        Returns:
        the type identifier
      • stateKey

        java.lang.String stateKey()
        A key indicating the current state of this artifact's inputs.

        This value should be cached if it is expensive to calculate.

        Returns:
        a key capturing this transformation's inputs
      • providePopulator

        java.util.concurrent.CompletableFuture<ArtifactModifier.TransformerProvider> providePopulator​(MinecraftResolver.Context context)
        Create a new populator for performing transformations.

        This will always be called from the thread where resolution is initiated.

        The populator returned must remain valid until it is closed.

        Parameters:
        context - the context available when preparing a populator, safe to use asynchronously
        Returns:
        a future providing the populator
      • requiresLocalStorage

        boolean requiresLocalStorage()
        Indicates that the result of this modification should be stored in the project-local storage, rather than global storage.
        Returns:
        whether local storage is required