org.fusesource.mvnplugins.uberize.transformer
Class ClassShader
java.lang.Object
org.fusesource.mvnplugins.uberize.transformer.ClassShader
- All Implemented Interfaces:
- Transformer
public class ClassShader
- extends java.lang.Object
- implements Transformer
Uses byte code manipulation to relocate java classes to a new package. It can optionally
update resource files so that class names referenced in the files are updated with
the new package names.
- Author:
- Jason van Zyl, Hiram Chirino
|
Method Summary |
java.lang.String |
mapClassName(java.util.List<Relocator> relocators,
java.lang.String name)
|
void |
process(Uberizer uberizer,
java.io.File workDir,
java.util.TreeMap<java.lang.String,UberEntry> nodes)
A transformer will modify the specified uber entries to apply transformation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
relocations
public PackageRelocation[] relocations
resources
public Resources resources
ClassShader
public ClassShader()
process
public void process(Uberizer uberizer,
java.io.File workDir,
java.util.TreeMap<java.lang.String,UberEntry> nodes)
throws java.io.IOException
- Description copied from interface:
Transformer
- A transformer will modify the specified uber entries to apply transformation. It can
add/remove entries from the map or replace existing uber entries.
A transformer should not modify exisiting uber entries. It should instead create new
enry instance (linked to the old one) and replace the old entry in the map with the
new entry.
- Specified by:
process in interface Transformer
- Parameters:
uberizer - the Uberizer instance requesting the transformation.workDir - a work directory that the transformer can store transformed files innodes - a map of all the jar entries that will be included in the uber jar
- Throws:
java.io.IOException
mapClassName
public java.lang.String mapClassName(java.util.List<Relocator> relocators,
java.lang.String name)
Copyright © 2009-2012 FuseSource. All Rights Reserved.