Package org.openjdk.asmtools.jdis
Class Indenter
- java.lang.Object
-
- org.openjdk.asmtools.jdis.Indenter
-
- Direct Known Subclasses:
BootstrapMethodData
,ClassArrayData
,CodeData
,InnerClassData
,MemberData
,Module
,NestHostData
,RecordData
public class Indenter extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private int
indentLength
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Indenter
decreaseIndent(int decrease)
Decreases indentation length.java.lang.String
getIndentString()
Creates indent string based on current indent size.Indenter
increaseIndent(int increase)
Increases indentation length.int
indent()
Returns current indentation length.Indenter
setIndent(int indentLength)
Increases indentation length.
-
-
-
Method Detail
-
indent
public int indent()
Returns current indentation length.- Returns:
- current indentation length.
-
setIndent
public Indenter setIndent(int indentLength)
Increases indentation length.- Parameters:
indentLength
- new indent length- Throws:
java.lang.IllegalArgumentException
- if indentLength is negative.
-
increaseIndent
public Indenter increaseIndent(int increase)
Increases indentation length.- Parameters:
increase
- length to increase by.- Throws:
java.lang.IllegalArgumentException
- if increase is negative.
-
decreaseIndent
public Indenter decreaseIndent(int decrease)
Decreases indentation length.- Parameters:
decrease
- length to decrease by- Throws:
java.lang.IllegalArgumentException
- if decrease is negative, or if decrease is greater thancurrent indentation length
.
-
getIndentString
public java.lang.String getIndentString()
Creates indent string based on current indent size.
-
-