com.google.gwt.inject.rebind.util
Class PrettyPrinter

java.lang.Object
  extended by com.google.gwt.inject.rebind.util.PrettyPrinter

public final class PrettyPrinter
extends java.lang.Object

Pretty-printer that formats internal types for human consumption in error messages.

format(String, Object...) acts like String.format(java.lang.String, java.lang.Object...), except that it detects and pretty-prints the following argument types:

All other arguments are passed unchanged to String.format(java.lang.String, java.lang.Object...).


Method Summary
static java.lang.String format(java.lang.String formatString, java.lang.Object... args)
          Generate a string based on a format template as String.format(java.lang.String, java.lang.Object...) would, using the pretty-printing rules specified in the class documentation.
static void log(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.TreeLogger.Type type, java.lang.String formatString, java.lang.Object... args)
          Log a pretty-printed message if the given log level is active.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

log

public static void log(com.google.gwt.core.ext.TreeLogger logger,
                       com.google.gwt.core.ext.TreeLogger.Type type,
                       java.lang.String formatString,
                       java.lang.Object... args)
Log a pretty-printed message if the given log level is active. The message is only formatted if it will be logged.


format

public static java.lang.String format(java.lang.String formatString,
                                      java.lang.Object... args)
Generate a string based on a format template as String.format(java.lang.String, java.lang.Object...) would, using the pretty-printing rules specified in the class documentation.