Class PrettyTypeFormatter

java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.type.PrettyTypeFormatter

public class PrettyTypeFormatter extends Object
C-like formatting an INativeType to a string. Allows formatting of nested structures.

Note that array formatting does not respect C type notation: [dimension] is not after the identifier name, but instead, after the type name. The dimensions are reversed. Example:

 C variable:
   int a[6][4];    // an two-dimensional array of integers, first dim: 6, second dim: 4
 would have its type rendered as:
   int[4][6]       // note the dimension ordering
 
  • Constructor Details

    • PrettyTypeFormatter

      public PrettyTypeFormatter()
    • PrettyTypeFormatter

      public PrettyTypeFormatter(int levelStructDepth, boolean fullDisplay)
  • Method Details

    • setLevelStructDepth

      public void setLevelStructDepth(int levelStructDepth)
    • getLevelStructDepth

      public int getLevelStructDepth()
    • setDisplayOffsets

      public void setDisplayOffsets(boolean displayOffsets)
    • isDisplayOffsets

      public boolean isDisplayOffsets()
    • setDisplayPaddingInfo

      public void setDisplayPaddingInfo(boolean displayPaddingInfo)
    • isDisplayPaddingInfo

      public boolean isDisplayPaddingInfo()
    • setDisplayAliasedType

      public void setDisplayAliasedType(boolean displayAliasedType)
    • isDisplayAliasedType

      public boolean isDisplayAliasedType()
    • setDisplayTrailingSemicolon

      public void setDisplayTrailingSemicolon(boolean displayTrailingSemicolon)
    • isDisplayTrailingSemicolon

      public boolean isDisplayTrailingSemicolon()
    • format

      public String format(INativeType t)