|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.watermark.ct.embed.Embedder
The sandmark.watermark.ct.embed.Embedder class contains methods for adding watermarking code to Java bytecode.
Field Summary | |
(package private) Forest |
callForest
|
(package private) ClassFileCollection |
cfc
|
(package private) Encoder |
encoder
|
(package private) java.util.Properties |
props
|
(package private) Stats |
statistics
|
(package private) TracePoint[] |
traceData
|
Constructor Summary | |
Embedder(java.util.Properties props,
TracePoint[] traceData)
|
Method Summary | |
(package private) MethodID[] |
allMethods()
Get all the methods in the program. |
(package private) Graph |
constructGraph(java.util.Properties props)
Construct and return a graph embedding the value WM_Encode_Watermark using encoding DWM_CT_Encode_Encoding. |
(package private) void |
embedClass(ClassFileCollection cfc,
de.fub.bytecode.classfile.JavaClass watermarkClass,
EmbedData[] embedData,
MethodID[] methods,
java.util.Properties props)
Add the watermark class to the cfc, and embed calls to it based on the embedding information in 'embedData'. |
(package private) EmbedData[] |
findEmbedding(de.fub.bytecode.classfile.JavaClass classFile,
TracePoint[] traceData)
Decide where the methods in the watermark class should be called in the application: Get the methods that build the watermark. |
EmbedData[] |
getEmbedding()
Compute the locations where calls to the watermarking routines should be inserted. |
void |
saveByteCode()
Add calls to the graph-building routines to the program to be watermarked. |
void |
saveCallForest(java.lang.String dotFileBaseName)
Write the dot files for the call forest graphs. |
void |
saveGraph(java.lang.String dotFileName)
Write the Java source for the watermark class. |
void |
saveSource(java.lang.String sourceFileName)
Write the Java source for the watermark class. |
java.lang.String |
source()
Get the Java source for the watermark class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.util.Properties props
TracePoint[] traceData
ClassFileCollection cfc
Encoder encoder
Forest callForest
Stats statistics
Constructor Detail |
public Embedder(java.util.Properties props, TracePoint[] traceData) throws java.lang.Exception
props
- global property listtraceData
- a vector of annotation points that
were hit during tracing
Reads properties:
Method Detail |
MethodID[] allMethods() throws java.io.IOException
java.io.IOException
public void saveByteCode() throws java.lang.Exception
java.lang.Exception
public EmbedData[] getEmbedding() throws java.lang.Exception
java.lang.Exception
public java.lang.String source()
public void saveSource(java.lang.String sourceFileName) throws java.lang.Exception
sourceFileName
- The name of the file to be written.
java.lang.Exception
public void saveGraph(java.lang.String dotFileName) throws java.lang.Exception
java.lang.Exception
public void saveCallForest(java.lang.String dotFileBaseName) throws java.lang.Exception
dotFileBaseName
- The base name (without the .dot extension)
of the files to be written.
java.lang.Exception
EmbedData[] findEmbedding(de.fub.bytecode.classfile.JavaClass classFile, TracePoint[] traceData) throws java.lang.Exception
classFile
- The class that builds the watermark graph.traceData
- Location of trace points hit during the
tracing run.
java.lang.Exception
void embedClass(ClassFileCollection cfc, de.fub.bytecode.classfile.JavaClass watermarkClass, EmbedData[] embedData, MethodID[] methods, java.util.Properties props) throws java.lang.Exception
cfc
- The application to be watermarked.watermarkClass
- The class that builds the watermark graph.embedData
- Where in the cfc calls to watermarkClass
should be embedded.methods
- The methods to which formal parameters should
be added to pass around storage containers.
java.lang.Exception
Graph constructGraph(java.util.Properties props) throws java.lang.Exception
props
- The property collection.
props contains at least:
java.lang.Exception
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |