core/src/com/google/inject/spi/ElementSource.java
public StackTraceElement[] getStackTrace() {
    int modulesCallStackSize = moduleSource.getStackTraceSize();
    int chunkSize = partialCallStack.length;
    int size = moduleSource.getStackTraceSize() + chunkSize;
    StackTraceElement[] callStack = new StackTraceElement[size];
    System.arraycopy(
        StackTraceElements.convertToStackTraceElement(partialCallStack),
        0,
        callStack,
        0,
        chunkSize);
    System.arraycopy(moduleSource.getStackTrace(), 0, callStack, chunkSize, modulesCallStackSize);
    return callStack;
  }
public StackTraceElement[] getStackTrace() {
    int modulesCallStackSize = moduleSource.getStackTraceSize();
    int chunkSize = partialCallStack.length;
    int size = moduleSource.getStackTraceSize() + chunkSize;
    StackTraceElement[] callStack = new StackTraceElement[size];
    System.arraycopy(
        StackTraceElements.convertToStackTraceElement(partialCallStack),
        0,
        callStack,
        0,
        chunkSize);
    System.arraycopy(moduleSource.getStackTrace(), 0, callStack, chunkSize, modulesCallStackSize);
    return callStack;
  }
Returns the sequence of method calls that ends at one of {@link com.google.inject.Binder}
{@code bindXXX()} methods and eventually defines the element. Note that {@link #getStackTrace}
lists {@link StackTraceElement StackTraceElements} in reverse chronological order. The first
element (index zero) is the last method call and the last element is the first method
invocation. In the cases where stack trace is not available (i.e.,the stack trace was not
collected), it returns an empty array.