final class ModuleSource
extends java.lang.Object
module
, provides the module class name, the parent module source
, and the call stack that ends just before the module configure(Binder)
method invocation.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
moduleClassName
The class name of module that this
ModuleSource associated to. |
private ModuleSource |
parent
The parent
module source . |
private StackTraceElements.InMemoryStackTraceElement[] |
partialCallStack
The chunk of call stack that starts from the parent module
configure(Binder) call and ends just before the module configure(Binder) method invocation. |
Modifier | Constructor and Description |
---|---|
private |
ModuleSource(ModuleSource parent,
java.lang.Object module,
java.lang.StackTraceElement[] partialCallStack)
Creates a new
ModuleSource Object. |
(package private) |
ModuleSource(java.lang.Object module,
java.lang.StackTraceElement[] partialCallStack)
Creates a new
ModuleSource with a null parent. |
Modifier and Type | Method and Description |
---|---|
(package private) ModuleSource |
createChild(java.lang.Object module,
java.lang.StackTraceElement[] partialCallStack)
Creates and returns a child
ModuleSource corresponding to the module . |
(package private) java.lang.String |
getModuleClassName()
Returns the corresponding module class name.
|
(package private) java.util.List<java.lang.String> |
getModuleClassNames()
Returns the class names of modules in this module source.
|
(package private) ModuleSource |
getParent()
Returns the parent module
source . |
(package private) java.lang.StackTraceElement[] |
getPartialCallStack()
Returns the chunk of call stack that starts from the parent module
configure(Binder) call and ends just before the module configure(Binder) method invocation. |
(package private) int |
getPartialCallStackSize()
Returns the size of partial call stack if stack trace collection is on otherwise zero.
|
(package private) java.lang.StackTraceElement[] |
getStackTrace()
Returns the full call stack that ends just before the module
configure(Binder) method invocation. |
(package private) int |
getStackTraceSize()
Returns the size of call stack that ends just before the module
configure(Binder) method invocation (see getStackTrace() ). |
(package private) int |
size()
Returns the size of
ModuleSources chain (all parents) that ends at this
object. |
private final java.lang.String moduleClassName
ModuleSource
associated to.private final ModuleSource parent
module source
.private final StackTraceElements.InMemoryStackTraceElement[] partialCallStack
configure(Binder)
call and ends just before the module configure(Binder)
method invocation. For a module without a parent module the chunk starts
from the bottom of call stack. The array is non-empty if stack trace collection is on.ModuleSource(java.lang.Object module, java.lang.StackTraceElement[] partialCallStack)
ModuleSource
with a null parent.module
- the corresponding modulepartialCallStack
- the chunk of call stack that starts from the parent module configure(Binder)
call and ends just before the module configure(Binder)
method invocationprivate ModuleSource(ModuleSource parent, java.lang.Object module, java.lang.StackTraceElement[] partialCallStack)
ModuleSource
Object.parent
- the parent module source
module
- the corresponding modulepartialCallStack
- the chunk of call stack that starts from the parent module configure(Binder)
call and ends just before the module configure(Binder)
method invocationjava.lang.String getModuleClassName()
Class.getName()
java.lang.StackTraceElement[] getPartialCallStack()
configure(Binder)
call and ends just before the module configure(Binder)
method invocation. The return array is non-empty
only if stack trace collection is on.int getPartialCallStackSize()
ModuleSource createChild(java.lang.Object module, java.lang.StackTraceElement[] partialCallStack)
ModuleSource
corresponding to the module
.module
- the corresponding modulepartialCallStack
- the chunk of call stack that starts from the parent module configure(Binder)
call and ends just before the module configure(Binder)
method invocationModuleSource getParent()
source
.java.util.List<java.lang.String> getModuleClassNames()
getModuleClassName()
. The second element is filled by the parent's
getModuleClassName()
and so on.int size()
ModuleSources
chain (all parents) that ends at this
object.int getStackTraceSize()
configure(Binder)
method invocation (see getStackTrace()
).java.lang.StackTraceElement[] getStackTrace()
configure(Binder)
method invocation. The return array is non-empty if stack trace collection
on.