Class Indenter
java.lang.Object
org.openjdk.asmtools.jdis.Indenter
- All Implemented Interfaces:
Printable
- Direct Known Subclasses:
AttributeData, ConstantPool, Container, Element, LineNumberData, LocalData, MemberData, ModuleContent, SourceDebugExtensionData
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final booleanstatic final intstatic final intprotected intprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprivate Stringprotected booleanstatic final Stringstatic final intstatic final intstatic final Stringstatic final intstatic final intprivate final Stringprivate intstatic final Stringprotected intprotected booleanstatic final Stringstatic final Stringprivate intstatic final intprotected booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanstatic final intstatic final Stringprotected final booleanstatic final intprivate intprotected final booleanstatic intprotected final booleanprotected TableFormatModel.Tokenprotected ToolOutputstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecIndent(int count) enlargedIndent(int shift) enlargedIndent(String str, int shift) protected StringformatOperandLine(String str, int offset, String prefix, Map<Integer, List<Integer>> breakPositions) Formats invokedynamic/ldc dynamic operand line and Bootstrap argumentsintintintCreates indent string based on current indent size.protected Stringintprotected intprotected intCalculates offsets for Class's attributes:protected StringgetTitle()incIndent(int count) IndentPadLeft(String str, int totalWidth) Formats input string by adding indent string and padding spaces from the left.IndentPadRight(String str, int totalWidth) Formats input string by adding indent string and padding spaces from the left.initIndent(int initialOffset) booleanprotected voidprotected voidjasmPrint(int index, int size) nCopies(int n) Formats input string by adding indent string and padding spaces from the left.voidprint()If a table format is supported and the tool option TABLE is set, prints an object as a table entry.voidprint(int index, int size) printIndent(String format, Object... args) printIndentLn(String format, Object... args) printIndentPadLeft(String str, int totalWidth) printIndentPadRight(String str, int totalWidth) println()println(boolean isPrint) printPadLeft(String s, int totalWidth) printPadRight(String s, int totalWidth) setCommentOffset(int commentOffset) setHasSize(boolean hasSize) setOffset(int offset) setTheSame(Indenter that) booleanprotected voidprotected voidtablePrint(int index, int size) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Printable
isPrintable
-
Field Details
-
UNDEFINED
public static final int UNDEFINED- See Also:
-
INDENT_STEP
public static final int INDENT_STEP- See Also:
-
INDENT_OFFSET
public static final int INDENT_OFFSET- See Also:
-
INDENT_CHAR
- See Also:
-
INDENT_STRING
-
ARGUMENT_DELIMITER
- See Also:
-
LINE_SPLITTER
- See Also:
-
NO_BSM_ARGUMENTS
- See Also:
-
NO_BSM_ARGUMENTS_REGEX
- See Also:
-
REPLACEMENT_NO_BSM_ARGUMENTS
- See Also:
-
PROGRAM_COUNTER_PLACEHOLDER_LENGTH
public static final int PROGRAM_COUNTER_PLACEHOLDER_LENGTH- See Also:
-
INSTR_PREFIX_LENGTH
public static final int INSTR_PREFIX_LENGTH- See Also:
-
STACKMAP_TYPE_PLACEHOLDER_LENGTH
public static final int STACKMAP_TYPE_PLACEHOLDER_LENGTH- See Also:
-
OPERAND_PLACEHOLDER_LENGTH
public static final int OPERAND_PLACEHOLDER_LENGTH- See Also:
-
TABLE_PADDING
public static int TABLE_PADDING -
COMMENT_PADDING
public static final int COMMENT_PADDING -
INITIAL_COMMENT_OFFSET
public static final int INITIAL_COMMENT_OFFSET- See Also:
-
CIRCULAR_COMMENT_OFFSET
public static final int CIRCULAR_COMMENT_OFFSET- See Also:
-
tableFormat
protected final boolean tableFormat -
sysInfo
protected final boolean sysInfo -
detailedOutput
protected final boolean detailedOutput -
extraDetailedOutput
protected final boolean extraDetailedOutput -
bestEffort
protected final boolean bestEffort -
dropSourceFile
protected final boolean dropSourceFile -
dropClasses
protected final boolean dropClasses -
dropSignatures
protected final boolean dropSignatures -
dropCharacterRange
protected final boolean dropCharacterRange -
printLocalVariables
protected final boolean printLocalVariables -
printLocalVariableTypes
protected final boolean printLocalVariableTypes -
printLineNumber
protected final boolean printLineNumber -
printCPIndex
protected final boolean printCPIndex -
skipComments
protected final boolean skipComments -
printProgramCounter
protected final boolean printProgramCounter -
printLabelAsIdentifiers
protected final boolean printLabelAsIdentifiers -
printConstantPool
protected final boolean printConstantPool -
printSourceLines
protected final boolean printSourceLines -
printLineTable
protected final boolean printLineTable -
printLineTableLines
protected final boolean printLineTableLines -
printLineTableNumbers
protected final boolean printLineTableNumbers -
printHEX
protected final boolean printHEX -
printable
protected boolean printable -
hasSize
protected boolean hasSize -
tableToken
-
maxSize
protected int maxSize -
maxSizeCalculated
protected boolean maxSizeCalculated -
toolOutput
-
LabelPrefix
-
commentOffset
protected int commentOffset -
length
private int length -
offset
private int offset -
step
private int step -
fillString
-
InvokeDynamicBreakPositions
-
LdwBreakPositions
-
BootstrapMethodBreakPositions
-
BootstrapArgumentsBreakPositions
-
-
Constructor Details
-
Indenter
-
Indenter
protected Indenter()
-
-
Method Details
-
print
If a table format is supported and the tool option TABLE is set, prints an object as a table entry.- Specified by:
printin interfacePrintable- Throws:
IOException
-
isTableOutput
public boolean isTableOutput() -
tableFormatSupported
public boolean tableFormatSupported()- Specified by:
tableFormatSupportedin interfacePrintable- Returns:
- true if a table format is supported
-
getTitle
-
tablePrint
- Throws:
IOException
-
jasmPrint
- Throws:
IOException
-
tablePrint
- Throws:
IOException
-
jasmPrint
- Throws:
IOException
-
print
- Throws:
IOException
-
getLabelPrefix
-
printIndentLn
-
printIndentLn
-
getIndentStep
public int getIndentStep() -
printIndentLn
-
printIndent
-
printIndent
-
printIndent
-
printPadRight
-
printPadLeft
-
printIndentPadRight
-
printIndentPadLeft
-
print
-
print
-
println
-
println
-
println
-
println
-
incIndent
-
decIndent
-
incIndent
-
decIndent
-
setTheSame
-
initIndent
-
getIndentSize
public int getIndentSize() -
nCopies
-
getIndentString
Creates indent string based on current indent size. -
IndentPadLeft
-
IndentPadRight
-
PadLeft
-
PadRight
-
padRight
-
padLeft
-
Indent
-
enlargedIndent
-
enlargedIndent
-
getCommentOffset
public int getCommentOffset()- Returns:
- the common offset of comments for printing methods
-
setCommentOffset
-
getOffset
public int getOffset()- Returns:
- the common offset of the indent
-
setOffset
-
getPrintAttributeKeyPadding
protected int getPrintAttributeKeyPadding()Calculates offsets for Class's attributes:12AAAAAAAAAAAAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCC SourceFile #126; // TestMethods0.java 12 - Indent AAA.A - getPrintAttributeKeyPadding() CCC.C - getPrintAttributeCommentPadding()
- Returns:
-
getPrintAttributeCommentPadding
protected int getPrintAttributeCommentPadding() -
setHasSize
-
formatOperandLine
protected String formatOperandLine(String str, int offset, String prefix, Map<Integer, List<Integer>> breakPositions) Formats invokedynamic/ldc dynamic operand line and Bootstrap arguments- Parameters:
str- non-formatted operand lineoffset- indent for new linesprefix- prefix placed upfront new linesbreakPositions- numbers where after ":" a lineSeparator is added to wrap a very long operand lines- Returns:
- formatted operand line
-