org.elasticsearch.common.inject.internal
Class SourceProvider

java.lang.Object
  extended by org.elasticsearch.common.inject.internal.SourceProvider

public class SourceProvider
extends Object

Provides access to the calling line of code.

Author:
crazybob@google.com (Bob Lee)

Field Summary
static SourceProvider DEFAULT_INSTANCE
           
static Object UNKNOWN_SOURCE
          Indicates that the source is unknown.
 
Constructor Summary
SourceProvider()
           
 
Method Summary
 StackTraceElement get()
          Returns the calling line of code.
 SourceProvider plusSkippedClasses(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 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(Class... moreClassesToSkip)
Returns a new instance that also skips 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.



Copyright © 2009-2012. All Rights Reserved.