| java.lang.Object com.google.inject.spi.SourceProviders
SourceProviders | public class SourceProviders (Code) | | Provides access to the default
SourceProvider implementation and
common controls for certain implementations.
author: crazybob@google.com (Bob Lee) |
Inner Class :static class StacktraceSourceProvider implements SourceProvider | |
Method Summary | |
public static Object | defaultSource() Returns the current source obtained from the default provider. | public static synchronized Set<String> | getSkippedClassNames() Gets the set of class names which should be skipped by stacktrace-based
providers. | public static synchronized void | skip(Class> clazz) Instructs stacktrace-based providers to skip the given class in the stack
trace when determining the source. | public static void | withDefault(SourceProvider sourceProvider, Runnable r) Sets the default source provider, runs the given command, and then
restores the previous default source provider. |
UNKNOWN_SOURCE | final public static Object UNKNOWN_SOURCE(Code) | | |
defaultSource | public static Object defaultSource()(Code) | | Returns the current source obtained from the default provider.
|
getSkippedClassNames | public static synchronized Set<String> getSkippedClassNames()(Code) | | Gets the set of class names which should be skipped by stacktrace-based
providers.
|
skip | public static synchronized void skip(Class> clazz)(Code) | | Instructs stacktrace-based providers to skip the given class in the stack
trace when determining the source. Use this to keep the binder 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.
|
withDefault | public static void withDefault(SourceProvider sourceProvider, Runnable r)(Code) | | Sets the default source provider, runs the given command, and then
restores the previous default source provider.
|
|
|