org.objectweb.asm.util.attrs
Class ASMStackMapTableAttribute
java.lang.Object
org.objectweb.asm.Attribute
org.objectweb.asm.attrs.StackMapTableAttribute
org.objectweb.asm.util.attrs.ASMStackMapTableAttribute
- All Implemented Interfaces:
- ASMifiable, Traceable
public class ASMStackMapTableAttribute
- extends StackMapTableAttribute
- implements ASMifiable, Traceable
An ASMifiable StackMapTableAttribute sub class.
- Author:
- Eugene Kuleshov
|
Field Summary |
private int |
len
Length of the attribute used for comparison |
|
Method Summary |
protected void |
appendLabel(java.lang.StringBuffer buf,
java.util.Map labelNames,
Label l)
|
void |
asmify(java.lang.StringBuffer buf,
java.lang.String varName,
java.util.Map labelNames)
Prints the ASM code to create an attribute equal to this attribute. |
(package private) void |
asmifyTypeInfo(java.lang.StringBuffer buf,
java.lang.String varName,
java.util.Map labelNames,
java.util.List infos,
java.lang.String field)
|
(package private) static void |
declareLabel(java.lang.StringBuffer buf,
java.util.Map labelNames,
Label l)
|
protected Attribute |
read(ClassReader cr,
int off,
int len,
char[] buf,
int codeOff,
Label[] labels)
Reads a type attribute. |
void |
trace(java.lang.StringBuffer buf,
java.util.Map labelNames)
Build a human readable representation of the attribute. |
private void |
traceTypeInfo(java.lang.StringBuffer buf,
java.util.Map labelNames,
java.util.List infos)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
len
private int len
- Length of the attribute used for comparison
ASMStackMapTableAttribute
public ASMStackMapTableAttribute()
ASMStackMapTableAttribute
public ASMStackMapTableAttribute(java.util.List frames,
int len)
read
protected Attribute read(ClassReader cr,
int off,
int len,
char[] buf,
int codeOff,
Label[] labels)
- Description copied from class:
Attribute
- Reads a
type attribute. This method must return a new
Attribute object, of type type, corresponding to
the len bytes starting at the given offset, in the given class
reader.
- Overrides:
read in class StackMapTableAttribute
- Parameters:
cr - the class that contains the attribute to be read.off - index of the first byte of the attribute's content in cr.b. The 6 attribute header bytes, containing the
type and the length of the attribute, are not taken into account
here.len - the length of the attribute's content.buf - buffer to be used to call
readUTF8,
readClass or
readConst.codeOff - index of the first byte of code's attribute content in
cr.b, or -1 if the attribute to be read is
not a code attribute. The 6 attribute header bytes, containing the
type and the length of the attribute, are not taken into account
here.labels - the labels of the method's code, or null if the
attribute to be read is not a code attribute.
- Returns:
- a new
Attribute object corresponding to the given
bytes.
asmify
public void asmify(java.lang.StringBuffer buf,
java.lang.String varName,
java.util.Map labelNames)
- Description copied from interface:
ASMifiable
- Prints the ASM code to create an attribute equal to this attribute.
- Specified by:
asmify in interface ASMifiable
- Parameters:
buf - A buffer used for printing Java code.varName - name of the variable in a printed code used to store
attribute instance.labelNames - map of label instances to their names.
asmifyTypeInfo
void asmifyTypeInfo(java.lang.StringBuffer buf,
java.lang.String varName,
java.util.Map labelNames,
java.util.List infos,
java.lang.String field)
declareLabel
static void declareLabel(java.lang.StringBuffer buf,
java.util.Map labelNames,
Label l)
trace
public void trace(java.lang.StringBuffer buf,
java.util.Map labelNames)
- Description copied from interface:
Traceable
- Build a human readable representation of the attribute.
- Specified by:
trace in interface Traceable
- Parameters:
buf - A buffer used for printing Java code.labelNames - map of label instances to their names.
traceTypeInfo
private void traceTypeInfo(java.lang.StringBuffer buf,
java.util.Map labelNames,
java.util.List infos)
appendLabel
protected void appendLabel(java.lang.StringBuffer buf,
java.util.Map labelNames,
Label l)