org.apache.commons.javaflow.bytecode.transformation.bcel.analyser
Class ExecutionPath

java.lang.Object
  extended by org.apache.commons.javaflow.bytecode.transformation.bcel.analyser.ExecutionPath

public final class ExecutionPath
extends java.lang.Object

List of InstructionContext that represents a sequence of an execution.

This object is immutable. The sequence is represented in left-associative style; that is, a sequence of [a,b,c,d] is represented as prev=[a,b,c] and last=d.

Author:
Kohsuke Kawaguchi

Field Summary
static ExecutionPath EMPTY
          Singleton ExecutionPath that represents an empty sequence [].
 
Method Summary
 ExecutionPath append(InstructionContext ins)
          Creates a new ExecutionPath that has [...
 InstructionContext lastExecutionJSR()
          Returns the InstructionContextImpl with an JSR/JSR_W that was last in the ExecutionChain, without a corresponding RET, i.e.
 java.lang.String toString()
          Returns a human readable representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final ExecutionPath EMPTY
Singleton ExecutionPath that represents an empty sequence [].

Method Detail

append

public ExecutionPath append(InstructionContext ins)
Creates a new ExecutionPath that has [... list in this ExecutionPath ..., ins].


lastExecutionJSR

public InstructionContext lastExecutionJSR()
Returns the InstructionContextImpl with an JSR/JSR_W that was last in the ExecutionChain, without a corresponding RET, i.e. we were called by this one. Returns null if we were called from the top level.


toString

public java.lang.String toString()
Returns a human readable representation.

Overrides:
toString in class java.lang.Object


Copyright 2004-2008 The Apache Software Foundation. All Rights Reserved.