Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jxcl.cl
Class MethodTransformer  view MethodTransformer download MethodTransformer.java

java.lang.Object
  extended byorg.jxcl.cl.MethodTransformer

public class MethodTransformer
extends java.lang.Object

Optionally preprocesses a method, optionally transforms its control flow graph, optionally postprocesses it. The list of preprocessors is applied in forward order before graph transformation. The corresponding list of postprocessors is applied in reverse order after graph transformation.


Field Summary
private  java.util.List gxf
          Graph processors.
private  java.util.Hashtable methodHash
          For passing application-specific data.
private  java.util.List mxf
          Ordered list of method pre- and post-processors.
private  GraphTransformer xformer
          Main graph processor.
 
Constructor Summary
MethodTransformer(java.util.List mxf, java.util.List gxf)
          Sets up method transformer, saving MethodXformer vector here and passing GraphXformer vector to that transformer.
 
Method Summary
(package private)  void dumpExceptionHandlers(org.apache.bcel.generic.MethodGen method, java.lang.String where, int len)
           
(package private)  void dumpIList(org.apache.bcel.generic.MethodGen method, java.lang.String where)
           
 java.util.Hashtable getMethodHash()
          Get a reference to the hash used to share data between this and other transformers.
 org.apache.bcel.generic.MethodGen xform(org.apache.bcel.generic.ClassGen clazz, org.apache.bcel.classfile.Method orig)
          Transform a specific method, first applying preprocessors, then transforming the graph, then applying method postprocessors.
private  void zapMethodXformer(MethodXformer mxf, java.lang.Exception e)
          Zero out a badly-behaved method Xformer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodHash

private java.util.Hashtable methodHash
For passing application-specific data. XXX Not used, probably best dropped.


mxf

private java.util.List mxf
Ordered list of method pre- and post-processors.


gxf

private java.util.List gxf
Graph processors.


xformer

private GraphTransformer xformer
Main graph processor.

Constructor Detail

MethodTransformer

public MethodTransformer(java.util.List mxf,
                         java.util.List gxf)
Sets up method transformer, saving MethodXformer vector here and passing GraphXformer vector to that transformer.

Method Detail

getMethodHash

public java.util.Hashtable getMethodHash()
Get a reference to the hash used to share data between this and other transformers.


zapMethodXformer

private void zapMethodXformer(MethodXformer mxf,
                              java.lang.Exception e)
Zero out a badly-behaved method Xformer.


xform

public org.apache.bcel.generic.MethodGen xform(org.apache.bcel.generic.ClassGen clazz,
                                               org.apache.bcel.classfile.Method orig)

Transform a specific method, first applying preprocessors, then transforming the graph, then applying method postprocessors.


dumpExceptionHandlers

void dumpExceptionHandlers(org.apache.bcel.generic.MethodGen method,
                           java.lang.String where,
                           int len)

dumpIList

void dumpIList(org.apache.bcel.generic.MethodGen method,
               java.lang.String where)