|
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.encode.Encoder
Main class for the encoder. Takes a sandmark.util.graph.Graph as input and returns a Java class ('Watermark.java') that builds this graph as output.
Constructor Summary | |
Encoder(Graph graph,
java.util.Properties props)
Called like this: sandmark.watermark.ct.encode.Encoder encoder = new sandmark.watermark.ct.encode.Encoder(graph,props); encoder.encode(); String javaFile = encoder.getSource(); de.fub.bytecode.generic.ClassGen byteCode = encoder.getByteCode(); try { String ClassName = props.getProperty("DWM_CT_Encode_ClassName"); cg.getJavaClass().dump(ClassName + ".class"); } catch (Exception e) { } The following properties should be defined: |
Method Summary | |
(package private) void |
dumpIR(java.lang.String header)
|
void |
encode()
Performs the actual encoding, by splitting the graph in DWM_CT_Encode_Components number of components converting the components to intermediate code converting the intermediate code to Java bytecode. |
de.fub.bytecode.generic.ClassGen |
getByteCode()
Return the bytecode of the Watermark.java class. |
MethodID[] |
getCreateMethods()
Return the names of the Create_graphX methods, in the order of which they should be called. |
java.lang.String[][] |
getCreateStorageMethods()
Return the names and types of the CreateStorage_X methods. |
Graph |
getGraph()
Return the watermark graph. |
java.lang.String |
getSource()
Return a string which is the source code of a Watermark.java class. |
Graph[] |
getSubGraphs()
Return the watermark subgraphs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Encoder(Graph graph, java.util.Properties props)
sandmark.watermark.ct.encode.Encoder encoder = new sandmark.watermark.ct.encode.Encoder(graph,props); encoder.encode(); String javaFile = encoder.getSource(); de.fub.bytecode.generic.ClassGen byteCode = encoder.getByteCode(); try { String ClassName = props.getProperty("DWM_CT_Encode_ClassName"); cg.getJavaClass().dump(ClassName + ".class"); } catch (Exception e) { }
The following properties should be defined:
Method Detail |
public void encode()
public java.lang.String getSource()
public de.fub.bytecode.generic.ClassGen getByteCode()
public Graph getGraph()
public Graph[] getSubGraphs()
public MethodID[] getCreateMethods()
public java.lang.String[][] getCreateStorageMethods()
(methodName,returnType,localName, GLOBAL/LOCAL).methodName is the name of the method to call, returnType is the name of the storage type ("java.util.Vector") it will return, localName is the name of the local variable into which the return value should be stored.
void dumpIR(java.lang.String header)
|
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 |