dk.brics.string.java
Class TranslatedStatement

java.lang.Object
  extended by dk.brics.string.java.TranslatedStatement

public final class TranslatedStatement
extends Object

Contains the entry and exit points for the control-flow graph of a single translated jimple-statement, and a list of all the Hotspot statements within.

Individual jimple-statement are always translated into a properly nested control-flow graph, before being connected with the other statements.

The statements are created by StatementTranslatorImpl and wrapped in a TranslatedStatement by StatementTranslatorFacade.


Constructor Summary
TranslatedStatement(Statement first, Statement last)
          Prepares the results of a translated statement.
 
Method Summary
 Statement getFirst()
          Gets the entry point from the statement's control-flow graph.
 List<HotspotValueBoxPair> getHotspots()
          Returns the list of hotspots in the statement's control-flow graph, along with the jimple expressions they originated from.
 Statement getLast()
          Gets the exit point from the statement's control-flow graph.
 List<Statement> getStatements()
          Returns all the statements in the translation, in an arbitrary order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslatedStatement

public TranslatedStatement(Statement first,
                           Statement last)
Prepares the results of a translated statement. The list of hotspots is initially empty, and should be added to the list returned by getHotspots().

Parameters:
first - entry point to the translated statement's control-flow graph
last - exit point from the translated statement's control-flow graph
Method Detail

getFirst

public Statement getFirst()
Gets the entry point from the statement's control-flow graph.


getHotspots

public List<HotspotValueBoxPair> getHotspots()
Returns the list of hotspots in the statement's control-flow graph, along with the jimple expressions they originated from. Hotspots may be added to this list.

Returns:
a mutable reference to the list of hotspots.

getLast

public Statement getLast()
Gets the exit point from the statement's control-flow graph.


getStatements

public List<Statement> getStatements()
Returns all the statements in the translation, in an arbitrary order.

Returns:
a mutable list backed by this object.


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