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 Object
  • Field Details

    • indentLength

      private int indentLength
  • Constructor Details

    • Indenter

      public Indenter(int indentLength)
    • Indenter

      public Indenter()
  • Method Details

    • 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:
      IllegalArgumentException - if indentLength is negative.
    • increaseIndent

      public Indenter increaseIndent(int increase)
      Increases indentation length.
      Parameters:
      increase - length to increase by.
      Throws:
      IllegalArgumentException - if increase is negative.
    • decreaseIndent

      public Indenter decreaseIndent(int decrease)
      Decreases indentation length.
      Parameters:
      decrease - length to decrease by
      Throws:
      IllegalArgumentException - if decrease is negative, or if decrease is greater than current indentation length.
    • getIndentString

      public String getIndentString()
      Creates indent string based on current indent size.