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, getFilesbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeprivate 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 AbstractProcessTaskjava.lang.Exceptionprivate void processClassFile(java.io.File file)
throws java.lang.Exception,
java.io.FileNotFoundException,
java.io.IOException,
java.net.MalformedURLException
file - java.lang.Exceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionjava.net.MalformedURLExceptionprotected int getFlags()
private static org.objectweb.asm.ClassReader getClassReader(java.io.File file)
throws java.lang.Exception
java.lang.Exceptionprotected boolean isClassFile(java.io.File file)
throws java.io.IOException
java.io.IOExceptionprotected void processJarFile(java.io.File file)
throws java.lang.Exception
java.lang.Exceptionprivate byte[] process(byte[] bytes)
throws java.lang.Exception
bytes - java.io.IOExceptionjava.lang.Exceptionprivate byte[] getBytes(java.util.zip.ZipInputStream zip)
throws java.io.IOException
zip - java.io.IOExceptionprivate boolean checkMagic(java.io.File file,
long magic)
throws java.io.IOException
java.io.IOExceptionprotected boolean isJarFile(java.io.File file)
throws java.io.IOException
java.io.IOException