Package com.google.inject.internal.util
Class SourceProvider
java.lang.Object
com.google.inject.internal.util.SourceProvider
Provides access to the calling line of code.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableSet<String> static final SourceProviderprivate final SourceProviderstatic final ObjectIndicates that the source is unknown. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSourceProvider(SourceProvider parent, Iterable<String> classesToSkip) privateSourceProvider(Iterable<String> classesToSkip) -
Method Summary
Modifier and TypeMethodDescriptionReturns the class names as Stringsget(StackTraceElement[] stackTraceElements) Returns the calling line of code.getFromClassNames(List<String> moduleClassNames) Returns the non-skipped module class name.plusSkippedClasses(Class<?>... moreClassesToSkip) Returns a new instance that also skipsmoreClassesToSkip.private booleanshouldBeSkipped(String className) Returns true if the className should be skipped.
-
Field Details
-
UNKNOWN_SOURCE
Indicates that the source is unknown. -
parent
-
classNamesToSkip
-
DEFAULT_INSTANCE
-
-
Constructor Details
-
SourceProvider
-
SourceProvider
-
-
Method Details
-
plusSkippedClasses
Returns a new instance that also skipsmoreClassesToSkip. -
shouldBeSkipped
Returns true if the className should be skipped. -
asStrings
Returns the class names as Strings -
get
Returns the calling line of code. The selected line is the nearest to the top of the stack that is not skipped. -
getFromClassNames
Returns the non-skipped module class name.
-