ch.qos.logback.classic.spi

## Class CallerData

- java.lang.Object
- - ch.qos.logback.classic.spi.CallerData

    public class CallerData
    extends Object

This class computes caller data returning the result in the form of a StackTraceElement array.

Author:
  Ceki Gülcü

### Field Summary

Fields
`static String` `CALLER_DATA_NA`
`static StackTraceElement[]` `EMPTY_CALLER_DATA_ARRAY` This value is returned in case no caller data could be extracted.
`static int` `LINE_NA` When caller information is not available this constant is used for the line number.
`static String` `NA` When caller information is not available this constant is used for file name, method name, etc.

### Constructor Summary

Constructors
Constructor and Description
`CallerData()`

### Method Summary

All Methods Static Methods Concrete Methods
`static StackTraceElement[]` `extract(Throwable t, String fqnOfInvokingClass, int maxDepth, List<String> frameworkPackageList)` Extract caller data information as an array based on a Throwable passed as parameter
`static StackTraceElement` `naInstance()` Returns a StackTraceElement where all string fields are set to `NA` and line number is set to `LINE_NA`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### NA

    public static final String NA

When caller information is not available this constant is used for file name, method name, etc.

See Also:
  Constant Field Values

#### LINE_NA

    public static final int LINE_NA

When caller information is not available this constant is used for the line number.

See Also:
  Constant Field Values

#### CALLER_DATA_NA

    public static final String CALLER_DATA_NA

#### EMPTY_CALLER_DATA_ARRAY

    public static final StackTraceElement[] EMPTY_CALLER_DATA_ARRAY

This value is returned in case no caller data could be extracted.

### Constructor Detail

#### CallerData

    public CallerData()

### Method Detail

#### extract

    public static StackTraceElement[] extract(Throwable t,
                                              String fqnOfInvokingClass,
                                              int maxDepth,
                                              List<String> frameworkPackageList)

Extract caller data information as an array based on a Throwable passed as parameter

#### naInstance

    public static StackTraceElement naInstance()

Returns a StackTraceElement where all string fields are set to `NA` and line number is set to `LINE_NA`.

Returns:
  StackTraceElement with values set to NA constants.
Since:
  1.0.10