Package play.inject

Class SourceProvider


  • public final class SourceProvider
    extends Object
    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 Detail

      • UNKNOWN_SOURCE

        public static final Object UNKNOWN_SOURCE
        Indicates that the source is unknown.
      • DEFAULT_INSTANCE

        public static final SourceProvider DEFAULT_INSTANCE
    • Method Detail

      • plusSkippedClasses

        public SourceProvider plusSkippedClasses​(Class... moreClassesToSkip)
        Returns a new instance that also skips moreClassesToSkip.
        Parameters:
        moreClassesToSkip - a list of classes to skip in from source provider.
        Returns:
        the source provider skipping moreClassesToSkip.
      • get

        public StackTraceElement 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.