public class ManifestResourceTransformer extends Object
Constructor and Description |
---|
ManifestResourceTransformer() |
Modifier and Type | Method and Description |
---|---|
boolean |
canTransformResource(String resource) |
boolean |
hasTransformedResource() |
boolean |
isForShade(String shade) |
boolean |
isUsedForDefaultShading() |
void |
modifyOutputStream(JarOutputStream jos) |
void |
processResource(String resource,
InputStream is,
List<Relocator> relocators)
Transform an individual resource
|
void |
processResource(String resource,
InputStream is,
List<Relocator> relocators,
long time)
Transform an individual resource
|
void |
setAdditionalAttributes(List<String> additionalAttributes) |
void |
setForShade(String shade)
The shades to apply this transformer to or no shades if no filter is applied.
|
void |
setMainClass(String mainClass) |
void |
setManifestEntries(Map<String,Object> manifestEntries) |
public void setMainClass(String mainClass)
public boolean canTransformResource(String resource)
public void processResource(String resource, InputStream is, List<Relocator> relocators, long time) throws IOException
ReproducibleResourceTransformer
resource
- The resource nameis
- An input stream for the resource, the implementation should *not* close this streamrelocators
- A list of relocatorstime
- the time of the resource to processIOException
- When the IO blows uppublic boolean hasTransformedResource()
public void modifyOutputStream(JarOutputStream jos) throws IOException
IOException
public void setForShade(String shade)
shade
- null
, jar
, test-jar
, sources-jar
or test-sources-jar
.public boolean isForShade(String shade)
public boolean isUsedForDefaultShading()
public final void processResource(String resource, InputStream is, List<Relocator> relocators) throws IOException
ResourceTransformer
processResource
in interface ResourceTransformer
resource
- The resource nameis
- An input stream for the resource, the implementation should *not* close this streamrelocators
- A list of relocatorsIOException
- When the IO blows upCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.