Class PropertiesTransformer
- java.lang.Object
-
- org.apache.maven.plugins.shade.resource.properties.PropertiesTransformer
-
- All Implemented Interfaces:
ReproducibleResourceTransformer
,ResourceTransformer
- Direct Known Subclasses:
MicroprofileConfigTransformer
,OpenWebBeansPropertiesTransformer
public class PropertiesTransformer extends java.lang.Object implements ReproducibleResourceTransformer
Enables to merge a set of properties respecting priority between them.- Since:
- 3.2.2
-
-
Constructor Summary
Constructors Modifier Constructor Description PropertiesTransformer()
protected
PropertiesTransformer(java.lang.String resource, java.lang.String ordinalKey, int defaultOrdinal, boolean reversed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canTransformResource(java.lang.String resource)
boolean
hasTransformedResource()
void
modifyOutputStream(java.util.jar.JarOutputStream os)
void
processResource(java.lang.String resource, java.io.InputStream is, java.util.List<Relocator> relocators)
Transform an individual resourcevoid
processResource(java.lang.String resource, java.io.InputStream is, java.util.List<Relocator> relocators, long time)
Transform an individual resourcevoid
setAlreadyMergedKey(java.lang.String alreadyMergedKey)
void
setDefaultOrdinal(int defaultOrdinal)
void
setOrdinalKey(java.lang.String ordinalKey)
void
setResource(java.lang.String resource)
void
setReverseOrder(boolean reverseOrder)
-
-
-
Method Detail
-
canTransformResource
public boolean canTransformResource(java.lang.String resource)
- Specified by:
canTransformResource
in interfaceResourceTransformer
-
processResource
public final void processResource(java.lang.String resource, java.io.InputStream is, java.util.List<Relocator> relocators) throws java.io.IOException
Description copied from interface:ResourceTransformer
Transform an individual resource- Specified by:
processResource
in interfaceResourceTransformer
- Parameters:
resource
- The resource nameis
- An input stream for the resource, the implementation should *not* close this streamrelocators
- A list of relocators- Throws:
java.io.IOException
- When the IO blows up
-
processResource
public void processResource(java.lang.String resource, java.io.InputStream is, java.util.List<Relocator> relocators, long time) throws java.io.IOException
Description copied from interface:ReproducibleResourceTransformer
Transform an individual resource- Specified by:
processResource
in interfaceReproducibleResourceTransformer
- Parameters:
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 process- Throws:
java.io.IOException
- When the IO blows up
-
hasTransformedResource
public boolean hasTransformedResource()
- Specified by:
hasTransformedResource
in interfaceResourceTransformer
-
modifyOutputStream
public void modifyOutputStream(java.util.jar.JarOutputStream os) throws java.io.IOException
- Specified by:
modifyOutputStream
in interfaceResourceTransformer
- Throws:
java.io.IOException
-
setReverseOrder
public void setReverseOrder(boolean reverseOrder)
-
setResource
public void setResource(java.lang.String resource)
-
setOrdinalKey
public void setOrdinalKey(java.lang.String ordinalKey)
-
setDefaultOrdinal
public void setDefaultOrdinal(int defaultOrdinal)
-
setAlreadyMergedKey
public void setAlreadyMergedKey(java.lang.String alreadyMergedKey)
-
-