Class StackMapData
- All Implemented Interfaces:
Printable
Represents one entry of StackMapTable attribute:
union stack_map_entry { same_frame; same_locals_1_stack_item_frame; same_locals_1_stack_item_frame_extended; chop_frame; same_frame_extended; append_frame; full_frame; }
or StackMap attribute
stack_map_entry { u2 offset; u2 number_of_locals; verification_type_info locals[number_of_locals]; u2 number_of_stack_items; verification_type_info stack[number_of_stack_items]; }
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class MemberData
MemberData.AnnotationElementStateNested classes/interfaces inherited from class Indenter
Indenter.NotImplementedException -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EAttributeprivate int(package private) intprivate String(package private) boolean(package private) int[](package private) intprivate StackMapData.Printerprivate int(package private) StackMap.EntryType(package private) int(package private) int[]private Stringprivate Stringprivate int(package private) int[](package private) intFields inherited from class MemberData
access, attributes, data, DEFAULT_VALUE_PREFIX, environment, invisibleAnnotations, invisibleTypeAnnotations, isDeprecated, isSynthetic, memberType, owner, pool, signature, visibleAnnotations, visibleTypeAnnotationsFields inherited from class Indenter
ARGUMENT_DELIMITER, bestEffort, BootstrapArgumentsBreakPositions, BootstrapMethodBreakPositions, CIRCULAR_COMMENT_OFFSET, COMMENT_PADDING, commentOffset, detailedOutput, dropCharacterRange, dropClasses, dropSignatures, dropSourceFile, extraDetailedOutput, hasSize, INDENT_CHAR, INDENT_OFFSET, INDENT_STEP, INDENT_STRING, INITIAL_COMMENT_OFFSET, INSTR_PREFIX_LENGTH, InvokeDynamicBreakPositions, LdwBreakPositions, LINE_SPLITTER, maxSize, maxSizeCalculated, NO_BSM_ARGUMENTS, NO_BSM_ARGUMENTS_REGEX, OPERAND_PLACEHOLDER_LENGTH, printable, printConstantPool, printCPIndex, printHEX, printLabelAsIdentifiers, printLineNumber, printLineTable, printLineTableLines, printLineTableNumbers, printLocalVariables, printLocalVariableTypes, printProgramCounter, printSourceLines, PROGRAM_COUNTER_PLACEHOLDER_LENGTH, REPLACEMENT_NO_BSM_ARGUMENTS, skipComments, STACKMAP_TYPE_PLACEHOLDER_LENGTH, sysInfo, TABLE_PADDING, tableFormat, tableToken, toolOutput, UNDEFINED -
Constructor Summary
ConstructorsConstructorDescriptionStackMapData(boolean firstStackMap, int prevFrame_pc, CodeData code, DataInputStream in) Constructor for ATT_StackMapTable (Java 6, 7+)StackMapData(CodeData code, DataInputStream in) Constructor for ATT_StackMap (Java 5,6) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprivate intgetCommentOffsetFor(int lineLength, int shiftCount) private intgetCommentOffsetFor(String line, int shiftCount) getFieldListAsString(int[] fields) intgetMapListAsString(int[] map, String delimiter) booleanprotected voidjasmPrint(int index, int size) Prints the StackMap data in Jasm format.private int[]private int[]private int[]readMapElements(DataInputStream in, int num) Sets table headersetPrintParticles(String intLine, String strLine, int shift) Sets helper printing particlesprivate voidstackMapPrinter(int index, int size) private voidstackMapTablePrinter(int index, int size) protected voidtablePrint(int index, int size) Methods inherited from class MemberData
calculateInlinedTitleShift, getAnnotationElementState, getAnnotationsCount, getConstantPool, getListOf, getPseudoFlagsAsString, handleAttributes, handleUnrecognizedAttributes, init, printAnnotations, printAttributes, printSysInfo, printVar, readAttributes, setElementState, setOwner, setSignatureMethods inherited from class Indenter
decIndent, decIndent, enlargedIndent, enlargedIndent, formatOperandLine, getCommentOffset, getIndentSize, getIndentStep, getIndentString, getLabelPrefix, getOffset, getPrintAttributeCommentPadding, getPrintAttributeKeyPadding, getTitle, incIndent, incIndent, Indent, IndentPadLeft, IndentPadRight, initIndent, isTableOutput, jasmPrint, nCopies, padLeft, PadLeft, padRight, PadRight, print, print, print, print, printIndent, printIndent, printIndent, printIndentLn, printIndentLn, printIndentLn, printIndentPadLeft, printIndentPadRight, println, println, println, println, printPadLeft, printPadRight, setCommentOffset, setHasSize, setOffset, setTheSame, tableFormatSupported, tablePrint
-
Field Details
-
range
-
attribute
-
stackEntryType
StackMap.EntryType stackEntryType -
stackEntryTypeValue
int stackEntryTypeValue -
isWrapped
boolean isWrapped -
wrapLevel
int wrapLevel -
frame_pc
int frame_pc -
offset
int offset -
lockMap
int[] lockMap -
stackMap
int[] stackMap -
unsetFields
int[] unsetFields -
printer
-
doubleIndent
private int doubleIndent -
tripleIndent
private int tripleIndent -
intLine
-
strLine
-
shift
private int shift -
tableHeader
-
-
Constructor Details
-
StackMapData
Constructor for ATT_StackMap (Java 5,6)- Parameters:
code- the code attribute where this attribute is locatedin- the input stream- Throws:
IOException- the exception if something went wrong
-
StackMapData
public StackMapData(boolean firstStackMap, int prevFrame_pc, CodeData code, DataInputStream in) throws IOException Constructor for ATT_StackMapTable (Java 6, 7+)- Parameters:
firstStackMap- is it an entries[0] in the stack_map_entry structure? i.e. Does the StackMapData describe the second stack map frame of the method?prevFrame_pc- the bytecode offset of the previous entry (entries[current_index-1])code- the code attribute where this attribute is locatedin- the input stream- Throws:
IOException- the exception if something went wrong
-
-
Method Details
-
jasmPrint
Prints the StackMap data in Jasm format.- Overrides:
jasmPrintin classIndenter- Parameters:
index- the index of the current entrysize- the total number of entries- Throws:
IOException- if an I/O error occurs while printing
-
stackMapPrinter
- Throws:
IOException
-
stackMapTablePrinter
private void stackMapTablePrinter(int index, int size) -
tablePrint
- Overrides:
tablePrintin classIndenter- Throws:
IOException
-
isPrintable
public boolean isPrintable() -
getFramePC
public int getFramePC()- Returns:
- the bytecode offset at which a stack map frame applies
-
getStackEntryType
-
getFieldListAsString
-
getMapListAsString
-
belongsToStackMapTable
public boolean belongsToStackMapTable()- Returns:
- true if the entity presents a StackMapTable since Java 6
-
setPrintParticles
Sets helper printing particles -
setHeader
Sets table header -
readMap
- Throws:
IOException
-
readFields
- Throws:
IOException
-
readMapElements
- Throws:
IOException
-
getCommentOffsetFor
-
getCommentOffsetFor
private int getCommentOffsetFor(int lineLength, int shiftCount)
-