public abstract class AbstractTransformTask extends AbstractProcessTask
Modifier and Type | Field and Description |
---|---|
private static int |
CLASS_MAGIC |
private boolean |
verbose |
private static int |
ZIP_MAGIC |
Constructor and Description |
---|
AbstractTransformTask() |
Modifier and Type | Method and Description |
---|---|
protected org.objectweb.asm.Attribute[] |
attributes() |
private boolean |
checkMagic(java.io.File file,
long magic) |
private byte[] |
getBytes(java.util.zip.ZipInputStream zip) |
private static org.objectweb.asm.ClassReader |
getClassReader(java.io.File file) |
protected abstract ClassTransformer |
getClassTransformer(java.lang.String[] classInfo)
returns transformation for source class
|
protected int |
getFlags() |
protected boolean |
isClassFile(java.io.File file) |
protected boolean |
isJarFile(java.io.File file) |
private byte[] |
process(byte[] bytes) |
private void |
processClassFile(java.io.File file) |
protected void |
processFile(java.io.File file) |
protected void |
processJarFile(java.io.File file) |
void |
setVerbose(boolean verbose) |
addFileset, beforeExecute, execute, getFiles
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
private static final int ZIP_MAGIC
private static final int CLASS_MAGIC
private boolean verbose
public void setVerbose(boolean verbose)
protected abstract ClassTransformer getClassTransformer(java.lang.String[] classInfo)
classInfo
- class information
class name := classInfo[ 0 ]
super class name := classInfo[ 1 ]
interfaces := classInfo[ >1 ]protected org.objectweb.asm.Attribute[] attributes()
protected void processFile(java.io.File file) throws java.lang.Exception
processFile
in class AbstractProcessTask
java.lang.Exception
private void processClassFile(java.io.File file) throws java.lang.Exception, java.io.FileNotFoundException, java.io.IOException, java.net.MalformedURLException
file
- java.lang.Exception
java.io.FileNotFoundException
java.io.IOException
java.net.MalformedURLException
protected int getFlags()
private static org.objectweb.asm.ClassReader getClassReader(java.io.File file) throws java.lang.Exception
java.lang.Exception
protected boolean isClassFile(java.io.File file) throws java.io.IOException
java.io.IOException
protected void processJarFile(java.io.File file) throws java.lang.Exception
java.lang.Exception
private byte[] process(byte[] bytes) throws java.lang.Exception
bytes
- java.io.IOException
java.lang.Exception
private byte[] getBytes(java.util.zip.ZipInputStream zip) throws java.io.IOException
zip
- java.io.IOException
private boolean checkMagic(java.io.File file, long magic) throws java.io.IOException
java.io.IOException
protected boolean isJarFile(java.io.File file) throws java.io.IOException
java.io.IOException