com.claritysys.jvm.disassembler
Class CodeIterator

java.lang.Object
  extended by com.claritysys.jvm.disassembler.CodeIterator

public final class CodeIterator
extends java.lang.Object


Nested Class Summary
static class CodeIterator.LineMarker
           
 
Constructor Summary
CodeIterator(Disassembler dis, CfMethod method, int parameterCount)
           
 
Method Summary
 void extractMarkers()
           
 int getArgPtr()
           
 byte[] getBytes()
           
static java.lang.String getLocalName(CfMethod method, int localNumber)
           
 java.lang.String getLocalName(int lnum)
           
 CodeIterator.LineMarker getMarker()
           
 CodeIterator.LineMarker getMarkerAtOffset(int offset)
           
 CodeIterator.LineMarker getMarkerAtPC(int target)
           
 CodeIterator.LineMarker getNextMarker()
           
 int getOpCount()
           
 int getPc()
           
 boolean hasNext()
           
 int nextI1()
           
 int nextI2()
           
 int nextI4()
           
 int nextOp()
          Consume the opcode under the PC and advance the PC by one.
 int nextU1()
           
 int nextU2()
           
 void reset()
           
 void setMethod(CfMethod method, int parameterCount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeIterator

public CodeIterator(Disassembler dis,
                    CfMethod method,
                    int parameterCount)
Method Detail

setMethod

public void setMethod(CfMethod method,
                      int parameterCount)

extractMarkers

public void extractMarkers()

reset

public void reset()

hasNext

public boolean hasNext()

nextOp

public int nextOp()
Consume the opcode under the PC and advance the PC by one.

If its a WIDE, consume the following opcode and set isWide = true.

Returns:
Constants.XXX (Opcode) or -1 if no more.

getArgPtr

public int getArgPtr()

getPc

public int getPc()

getBytes

public byte[] getBytes()

getOpCount

public int getOpCount()

nextU1

public int nextU1()

nextU2

public int nextU2()

nextI1

public int nextI1()

nextI2

public int nextI2()

nextI4

public int nextI4()

getMarker

public CodeIterator.LineMarker getMarker()

getNextMarker

public CodeIterator.LineMarker getNextMarker()

getMarkerAtOffset

public CodeIterator.LineMarker getMarkerAtOffset(int offset)

getMarkerAtPC

public CodeIterator.LineMarker getMarkerAtPC(int target)

getLocalName

public static java.lang.String getLocalName(CfMethod method,
                                            int localNumber)

getLocalName

public java.lang.String getLocalName(int lnum)


Copyright ? 2000-2003 Clarity Systems Group, LLC. All Rights Reserved.