Class OfflineInstrumenter
- java.lang.Object
-
- com.ibm.wala.shrike.shrikeBT.tools.OfflineInstrumenterBase
-
- com.ibm.wala.shrike.shrikeBT.shrikeCT.OfflineInstrumenter
-
public final class OfflineInstrumenter extends OfflineInstrumenterBase
This class provides a convenient way to iterate through a collection of Java classes and instrument their code. This is just a specialization of OfflineInstrumenterBase to use the shrikeCT functionality.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.ibm.wala.shrike.shrikeBT.tools.OfflineInstrumenterBase
OfflineInstrumenterBase.ManifestBuilder
-
-
Field Summary
-
Fields inherited from class com.ibm.wala.shrike.shrikeBT.tools.OfflineInstrumenterBase
cha
-
-
Constructor Summary
Constructors Constructor Description OfflineInstrumenter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetClassName(java.lang.Object cl)protected java.lang.ObjectmakeClassFromStream(java.lang.String inputName, java.io.BufferedInputStream s)ClassInstrumenternextClass()Get the next class to be instrumented.voidoutputModifiedClass(ClassInstrumenter out)Update the original class with some method changes.voidoutputModifiedClass(ClassInstrumenter out, ClassWriter code)Update the original class with some method changes.protected voidwriteClassTo(java.lang.Object cl, java.lang.Object mods, java.io.OutputStream s)-
Methods inherited from class com.ibm.wala.shrike.shrikeBT.tools.OfflineInstrumenterBase
addInputClass, addInputDirectory, addInputElement, addInputJar, addInputJarEntry, addOutputJarEntry, beginTraversal, close, copyStream, endOutputJarEntry, getLastClassResourceName, getNumInputClasses, getOutputFile, internalNextClass, internalOutputModifiedClass, parseStandardArgs, setClassHierarchyProvider, setIgnore, setJARComment, setManifestBuilder, setOutputJar, setPassUnmodifiedClasses, writeUnmodifiedClasses
-
-
-
-
Method Detail
-
makeClassFromStream
protected java.lang.Object makeClassFromStream(java.lang.String inputName, java.io.BufferedInputStream s) throws java.io.IOException- Specified by:
makeClassFromStreamin classOfflineInstrumenterBase- Throws:
java.io.IOException
-
getClassName
protected java.lang.String getClassName(java.lang.Object cl)
- Specified by:
getClassNamein classOfflineInstrumenterBase
-
writeClassTo
protected void writeClassTo(java.lang.Object cl, java.lang.Object mods, java.io.OutputStream s) throws java.io.IOException- Specified by:
writeClassToin classOfflineInstrumenterBase- Throws:
java.io.IOException
-
nextClass
public ClassInstrumenter nextClass() throws java.io.IOException
Get the next class to be instrumented.- Throws:
java.io.IOException
-
outputModifiedClass
public void outputModifiedClass(ClassInstrumenter out, ClassWriter code) throws java.lang.IllegalStateException, java.io.IOException
Update the original class with some method changes. 'code' should be the result of out.emitClass(). You can add new fields and methods to 'code' (or make other changes) before calling this method.- Throws:
java.lang.IllegalStateExceptionjava.io.IOException
-
outputModifiedClass
public void outputModifiedClass(ClassInstrumenter out) throws java.lang.IllegalArgumentException, java.io.IOException
Update the original class with some method changes. This method calls out.emitClass() for you.- Throws:
java.lang.IllegalArgumentExceptionjava.io.IOException
-
-