Package play.inject

Class SourceProvider

java.lang.Object
play.inject.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 Details

    • UNKNOWN_SOURCE

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

      public static final SourceProvider DEFAULT_INSTANCE
  • Method Details

    • 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.