Package play.inject
Class SourceProvider
java.lang.Object
play.inject.SourceProvider
Provides access to the calling line of code.
https://github.com/google/guice/blob/3.0/core/src/com/google/inject/internal/util/SourceProvider.java
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SourceProviderstatic final ObjectIndicates that the source is unknown. -
Method Summary
Modifier and TypeMethodDescriptionget()Returns the calling line of code.plusSkippedClasses(Class... moreClassesToSkip) Returns a new instance that also skipsmoreClassesToSkip.
-
Field Details
-
UNKNOWN_SOURCE
Indicates that the source is unknown. -
DEFAULT_INSTANCE
-
-
Method Details
-
plusSkippedClasses
Returns a new instance that also skipsmoreClassesToSkip.- Parameters:
moreClassesToSkip- a list of classes to skip in from source provider.- Returns:
- the source provider skipping
moreClassesToSkip.
-
get
Returns the calling line of code. The selected line is the nearest to the top of the stack that is not skipped.- Returns:
- a stack trace element containing the caller.
-