jasm.attributes
Class StackMapTable

java.lang.Object
  extended by jasm.attributes.StackMapTable
All Implemented Interfaces:
BytecodeAttribute

public class StackMapTable
extends java.lang.Object
implements BytecodeAttribute

Consists of zero or more stack map frames. Each stack map frame specifies (either explicitly or implicitly) a bytecode offset, the verification types for the local variables, and the verification types for the operand stack.

Author:
David J. Pearce

Nested Class Summary
static class StackMapTable.Frame
          Represents a full stack frame.
 
Nested classes/interfaces inherited from interface jasm.lang.BytecodeAttribute
BytecodeAttribute.Fn, BytecodeAttribute.Reader, BytecodeAttribute.Unknown
 
Constructor Summary
StackMapTable(StackMapTable.Frame[] frames)
           
 
Method Summary
 void addPoolItems(java.util.Set<Constant.Info> constantPool)
          When this method is called, the attribute must add all items that it needs to the constant pool.
 StackMapTable.Frame frameAt(int index)
          Returns the stack frame at the given bytecode index.
 java.lang.String name()
           
 void print(java.io.PrintWriter output, java.util.Map<Constant.Info,java.lang.Integer> constantPool)
          This method is used to print the contents of the attribute in human-readable form, similar to that produced by "javap".
 void write(BinaryOutputStream writer, java.util.Map<Constant.Info,java.lang.Integer> constantPool)
          This method requires the attribute to write itself to the binary stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackMapTable

public StackMapTable(StackMapTable.Frame[] frames)
Method Detail

name

public java.lang.String name()
Specified by:
name in interface BytecodeAttribute

write

public void write(BinaryOutputStream writer,
                  java.util.Map<Constant.Info,java.lang.Integer> constantPool)
           throws java.io.IOException
Description copied from interface: BytecodeAttribute
This method requires the attribute to write itself to the binary stream.

Specified by:
write in interface BytecodeAttribute
Throws:
java.io.IOException

addPoolItems

public void addPoolItems(java.util.Set<Constant.Info> constantPool)
Description copied from interface: BytecodeAttribute
When this method is called, the attribute must add all items that it needs to the constant pool.

Specified by:
addPoolItems in interface BytecodeAttribute

print

public void print(java.io.PrintWriter output,
                  java.util.Map<Constant.Info,java.lang.Integer> constantPool)
           throws java.io.IOException
Description copied from interface: BytecodeAttribute
This method is used to print the contents of the attribute in human-readable form, similar to that produced by "javap".

Specified by:
print in interface BytecodeAttribute
Throws:
java.io.IOException

frameAt

public StackMapTable.Frame frameAt(int index)
Returns the stack frame at the given bytecode index. Observe that this is not the bytecode offset; rather, it's the index into the array returned by Code.bytecodes.

Parameters:
index -
Returns:


Copyright © 2013 David J. Pearce. All Rights Reserved.