Class TypePrettyPrint.TypePrettyPrinter

  • Enclosing class:
    TypePrettyPrint

    public static class TypePrettyPrint.TypePrettyPrinter
    extends Object
    Options to pretty print a type. Cannot be used concurrently.
    • Constructor Detail

      • TypePrettyPrinter

        public TypePrettyPrinter()
        Create a new pretty printer with the default configuration.
    • Method Detail

      • printMethodHeader

        public TypePrettyPrint.TypePrettyPrinter printMethodHeader​(boolean printMethodHeader)
        Print the declaring type of the method and its type parameters. Default: true.
      • printMethodResult

        public TypePrettyPrint.TypePrettyPrinter printMethodResult​(boolean printMethodResult)
        Print the return type of methods (as postfix). Default: true.
      • printTypeVarBounds

        public void printTypeVarBounds​(OptionalBool printTypeVarBounds)
        Print the bounds of type variables. Default: false.
      • qualifyTvars

        public TypePrettyPrint.TypePrettyPrinter qualifyTvars​(boolean qualifyTvars)
        Qualify type variables with the name of the declaring symbol. Eg Foo#T for class Foo<T>}. Default: false.
      • qualifyAnnotations

        public TypePrettyPrint.TypePrettyPrinter qualifyAnnotations​(boolean qualifyAnnotations)
        Whether to print the binary name of a type annotation or just the simple name if false. Default: false.
      • qualifyNames

        public TypePrettyPrint.TypePrettyPrinter qualifyNames​(boolean qualifyNames)
        Use qualified names for class types instead of simple names. Default: true.