Class SourceProvider


  • public class SourceProvider
    extends java.lang.Object
    Provides access to the calling line of code.
    • Constructor Summary

      Constructors 
      Constructor Description
      SourceProvider()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.StackTraceElement get()
      Returns the calling line of code.
      SourceProvider plusSkippedClasses​(java.lang.Class... moreClassesToSkip)
      Returns a new instance that also skips moreClassesToSkip.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UNKNOWN_SOURCE

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

        public static final SourceProvider DEFAULT_INSTANCE
    • Constructor Detail

      • SourceProvider

        public SourceProvider()
    • Method Detail

      • plusSkippedClasses

        public SourceProvider plusSkippedClasses​(java.lang.Class... moreClassesToSkip)
        Returns a new instance that also skips moreClassesToSkip.
      • get

        public java.lang.StackTraceElement get()
        Returns the calling line of code. The selected line is the nearest to the top of the stack that is not skipped.