Package net.sf.cglib.transform
Class AbstractTransformTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
net.sf.cglib.transform.AbstractProcessTask
net.sf.cglib.transform.AbstractTransformTask
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private boolean
private static final int
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.objectweb.asm.Attribute[]
private boolean
checkMagic
(File file, long magic) private byte[]
getBytes
(ZipInputStream zip) private static org.objectweb.asm.ClassReader
getClassReader
(File file) protected abstract ClassTransformer
getClassTransformer
(String[] classInfo) returns transformation for source classprotected int
getFlags()
protected boolean
isClassFile
(File file) protected boolean
private byte[]
process
(byte[] bytes) private void
processClassFile
(File file) protected void
processFile
(File file) protected void
processJarFile
(File file) void
setVerbose
(boolean verbose) Methods inherited from class net.sf.cglib.transform.AbstractProcessTask
addFileset, beforeExecute, execute, getFiles
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
ZIP_MAGIC
private static final int ZIP_MAGIC- See Also:
-
CLASS_MAGIC
private static final int CLASS_MAGIC- See Also:
-
verbose
private boolean verbose
-
-
Constructor Details
-
AbstractTransformTask
public AbstractTransformTask()
-
-
Method Details
-
setVerbose
public void setVerbose(boolean verbose) -
getClassTransformer
returns transformation for source class- Parameters:
classInfo
- class information class name := classInfo[ 0 ] super class name := classInfo[ 1 ] interfaces := classInfo[ >1 ]
-
attributes
protected org.objectweb.asm.Attribute[] attributes() -
processFile
- Specified by:
processFile
in classAbstractProcessTask
- Throws:
Exception
-
processClassFile
private void processClassFile(File file) throws Exception, FileNotFoundException, IOException, MalformedURLException - Parameters:
file
-- Throws:
Exception
FileNotFoundException
IOException
MalformedURLException
-
getFlags
protected int getFlags() -
getClassReader
- Throws:
Exception
-
isClassFile
- Throws:
IOException
-
processJarFile
- Throws:
Exception
-
process
- Parameters:
bytes
-- Returns:
- Throws:
IOException
Exception
-
getBytes
- Parameters:
zip
-- Returns:
- Throws:
IOException
-
checkMagic
- Throws:
IOException
-
isJarFile
- Throws:
IOException
-