|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.threerings.presents.tools.InstrumentStreamableTask
public class InstrumentStreamableTask
Instruments compiled Streamable classes with public methods that can be used to stream
protected and private members when running in a sandboxed JVM.
| Field Summary | |
|---|---|
protected ArrayList<FileSet> |
_filesets
A list of filesets that contain Streamable class files. |
protected File |
_outdir
The directory to which we write our instrumented class files. |
protected ArrayList<Path> |
_paths
A list of paths that make up our classpath. |
protected javassist.ClassPool |
_pool
Used to instrument class files. |
protected javassist.CtClass |
_streamable
Used to determine which classes implement Streamable. |
protected static String |
BSNAME
|
| 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 | |
|---|---|
InstrumentStreamableTask()
|
|
| Method Summary | |
|---|---|
void |
addFileset(FileSet set)
Adds a nested <fileset> element which enumerates streamable class files. |
void |
addPath(Path path)
Adds a <path> element which defines our classpath. |
void |
execute()
|
protected String |
getFieldReader(javassist.CtField field)
|
protected String |
getFieldWriter(javassist.CtField field)
|
protected void |
processClass(File source)
Processes a class file. |
protected void |
processStreamable(File source,
javassist.CtClass clazz)
Instruments the supplied Streamable implementing class. |
protected String |
readWrap(javassist.CtField field,
String body)
|
void |
setOutdir(File outdir)
Configures the directory into which we write our instrumented class files. |
protected String |
writeWrap(javassist.CtField field,
String body)
|
| 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 |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ArrayList<FileSet> _filesets
protected ArrayList<Path> _paths
protected File _outdir
protected javassist.ClassPool _pool
protected javassist.CtClass _streamable
Streamable.
protected static final String BSNAME
| Constructor Detail |
|---|
public InstrumentStreamableTask()
| Method Detail |
|---|
public void addFileset(FileSet set)
public void addPath(Path path)
public void setOutdir(File outdir)
public void execute()
execute in class Taskprotected void processClass(File source)
protected void processStreamable(File source,
javassist.CtClass clazz)
throws javassist.NotFoundException
Streamable implementing class.
javassist.NotFoundException
protected String getFieldReader(javassist.CtField field)
throws javassist.NotFoundException
javassist.NotFoundException
protected String getFieldWriter(javassist.CtField field)
throws javassist.NotFoundException
javassist.NotFoundException
protected String readWrap(javassist.CtField field,
String body)
throws javassist.NotFoundException
javassist.NotFoundException
protected String writeWrap(javassist.CtField field,
String body)
throws javassist.NotFoundException
javassist.NotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||