com.google.inject.spi
Class DefaultSourceProvider
java.lang.Object
com.google.inject.spi.DefaultSourceProvider
- All Implemented Interfaces:
- SourceProvider
public class DefaultSourceProvider
- extends Object
- implements SourceProvider
A source provider which returns ContainerBuilder
's caller's StackTraceElement
.
- Author:
- crazybob@google.com (Bob Lee)
Method Summary |
void |
skip(Class<?> clazz)
Instructs the provider to skip the given class in the stack trace when
determining the source. |
Object |
source()
Creates an object pointing to the current location within the
configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSourceProvider
public DefaultSourceProvider()
skip
public void skip(Class<?> clazz)
- Instructs the provider to skip the given class in the stack trace when
determining the source. Use this to keep the container builder from
logging utility methods as the sources of bindings (i.e. it will skip to
the utility methods' callers instead).
Skipping only takes place after this method is called.
source
public Object source()
- Description copied from interface:
SourceProvider
- Creates an object pointing to the current location within the
configuration. If we run into a problem later, we'll be able to trace it
back to the original source. Useful for debugging.
- Specified by:
source
in interface SourceProvider