Interface ArtifactModifier
-
- All Known Implementing Classes:
AccessWidenerModifier
public interface ArtifactModifierSome sort of operation that can be performed on a jar, via aRenamer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceArtifactModifier.TransformerProviderA function that can provide aTransformerfor use with a renamer, optionally having a post-rename operation to clean up resources.
-
Field Summary
Fields Modifier and Type Field Description static charENTRY_SEPARATORstatic charKEY_VALUE_SEPARATOR
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static java.lang.StringdecorateArtifactId(java.lang.String originalId, java.util.Set<ArtifactModifier> modifiers)java.lang.Stringkey()A short (1-3 character) identifier for this type of artifact transformation.java.util.concurrent.CompletableFuture<ArtifactModifier.TransformerProvider>providePopulator(MinecraftResolver.Context context)Create a new populator for performing transformations.booleanrequiresLocalStorage()Indicates that the result of this modification should be stored in the project-local storage, rather than global storage.java.lang.StringstateKey()A key indicating the current state of this artifact's inputs.
-
-
-
Field Detail
-
ENTRY_SEPARATOR
static final char ENTRY_SEPARATOR
- See Also:
- Constant Field Values
-
KEY_VALUE_SEPARATOR
static final char KEY_VALUE_SEPARATOR
- See Also:
- Constant Field Values
-
-
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
-
-