org.sonatype.guice.bean.reflect
Class Logs

java.lang.Object
  extended by org.sonatype.guice.bean.reflect.Logs

public final class Logs
extends Object

Utility methods for dealing with internal debug and warning messages.
Set -Dorg.sonatype.inject.debug=true to send debug to the console.


Field Summary
static boolean DEBUG_ENABLED
           
static String NEW_LINE
           
 
Method Summary
static void debug(String format, Object arg1, Object arg2)
          Logs a debug message; uses "{}" format anchors.
static String identityToString(Object object)
          Returns an identity string for the given object.
static String toString(com.google.inject.Injector injector)
          Returns a string representation of the given Injector.
static String toString(com.google.inject.Module module)
          Returns a string representation of the given Module.
static void warn(String format, Object arg1, Object arg2)
          Logs a warning message; uses "{}" format anchors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_LINE

public static final String NEW_LINE

DEBUG_ENABLED

public static final boolean DEBUG_ENABLED
Method Detail

debug

public static void debug(String format,
                         Object arg1,
                         Object arg2)
Logs a debug message; uses "{}" format anchors. Pass Throwables in last parameter for special handling.

Parameters:
format - The debug message format
arg1 - First object to format
arg2 - Second object to format

warn

public static void warn(String format,
                        Object arg1,
                        Object arg2)
Logs a warning message; uses "{}" format anchors. Pass Throwables in last parameter for special handling.

Parameters:
format - The warning message format
arg1 - First object to format
arg2 - Second object to format

identityToString

public static String identityToString(Object object)
Returns an identity string for the given object.

Parameters:
object - The object
Returns:
Identity string of the object.
See Also:
System.identityHashCode(Object)

toString

public static String toString(com.google.inject.Module module)
Returns a string representation of the given Module.

Parameters:
module - The module
Returns:
String representation of the module.

toString

public static String toString(com.google.inject.Injector injector)
Returns a string representation of the given Injector.

Parameters:
injector - The injector
Returns:
String representation of the injector.


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.