dk.brics.string.java
Interface MethodTranslator

All Known Implementing Classes:
MethodTranslatorImpl

public interface MethodTranslator

Translates the bodies of jimple-methods into intermediate form.

This interface is used by Jimple2Intermediate to interact with the MethodTranslatorImpl class.

The diagram below indicates how the classes interact during the translation of jimple code. An arrow indicates calls to methods declared in the specified interface, with the destination class being the implementation that is used.

 Jimple2Intermediate
          |
          |  (interface: MethodTranslator)
          V
 MethodTranslatorImpl
          |
          |  (interface: StatementTranslatorFacade)
          V
 StatementTranslatorFacadeImpl
          | 
          |  (interface: StatementTranslator)
          V 
 StatementTranslatorImpl
          | 
          |  (interface: MethodCallTranslator)
          V 
 CompositeMethodCallTranslator
          |  
          +--> BuiltinMethodCallTranslator
          +--> ResolverMethodCallTranslator
          +--> ApplicationMethodCallTranslator
 
For completeness, there should be an additional arrow to StatementTranslatorFacadeImpl going upwards from StatementTranslatorImpl and the method call translators, with the interface IntermediateFactory, with another arrow to Jimple2Intermediate with the interface TranslationContext.


Method Summary
 List<HotspotInfo> translateMethod(SootMethod sootMethod, TranslationContext jt)
          Translates the body of the specified jimple-method, and stores the intermediate code in the appropriate intermediate Method.
 

Method Detail

translateMethod

List<HotspotInfo> translateMethod(SootMethod sootMethod,
                                  TranslationContext jt)
Translates the body of the specified jimple-method, and stores the intermediate code in the appropriate intermediate Method.

Parameters:
sootMethod - a method from an application class.
Returns:
a new list of all the hotspots and associated information found in the method.


Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.