com.google.gwt.inject.rebind.binding
Class Context

java.lang.Object
  extended by com.google.gwt.inject.rebind.binding.Context

public class Context
extends java.lang.Object

Describes the context in which a binding or dependency was created.


Constructor Summary
protected Context(java.lang.String contextFormat, java.lang.Object... contextArgs)
           
 
Method Summary
static Context forElement(Element element)
          Create a Context storing the context of the given Guice Element.
static Context format(java.lang.String contextFmt, java.lang.Object... args)
          Create a Context from formatted text.
static Context forText(java.lang.String text)
          Create a Context from a text string.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Context

protected Context(java.lang.String contextFormat,
                  java.lang.Object... contextArgs)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

forElement

public static Context forElement(Element element)
Create a Context storing the context of the given Guice Element.


forText

public static Context forText(java.lang.String text)
Create a Context from a text string.


format

public static Context format(java.lang.String contextFmt,
                             java.lang.Object... args)
Create a Context from formatted text. The text will not be formatted until toString() is invoked.

Parameters:
contextFmt - format string, as with PrettyPrinter.format(String, Object...)
args - arguments for the format string, as with PrettyPrinter.format(String, Object...)