Logback API
Version 0.9.8

ch.qos.logback.classic.spi
Class CallerData

java.lang.Object
  extended by ch.qos.logback.classic.spi.CallerData
All Implemented Interfaces:
Serializable

public class CallerData
extends Object
implements Serializable

The internal representation of caller location information.

Author:
Ceki Gülcü
See Also:
Serialized Form

Field Summary
static String CALLER_DATA_NA
           
static CallerData[] 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
CallerData(StackTraceElement ste)
           
CallerData(String fileName, String className, String methodName, int lineNumber)
           
 
Method Summary
 boolean equals(Object o)
           
static CallerData[] extract(Throwable t, String fqnOfInvokingClass)
          Extract caller data information as an array based on a Throwable passed as parameter
 String getClassName()
          Return the fully qualified class name of the caller making the logging request.
 String getFileName()
          Return the file name of the caller.
 int getLineNumber()
          Returns the line number of the caller.
 String getMethodName()
          Returns the method name of the caller.
 boolean isNativeMethod()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, 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 String CALLER_DATA_NA

EMPTY_CALLER_DATA_ARRAY

public static CallerData[] EMPTY_CALLER_DATA_ARRAY
This value is returned in case no caller data could be extracted.

Constructor Detail

CallerData

public CallerData(String fileName,
                  String className,
                  String methodName,
                  int lineNumber)

CallerData

public CallerData(StackTraceElement ste)
Method Detail

extract

public static CallerData[] extract(Throwable t,
                                   String fqnOfInvokingClass)
Extract caller data information as an array based on a Throwable passed as parameter


equals

public boolean equals(Object o)
Overrides:
equals in class Object

getClassName

public String getClassName()
Return the fully qualified class name of the caller making the logging request.


getFileName

public String getFileName()
Return the file name of the caller.

This information is not always available.


getLineNumber

public int getLineNumber()
Returns the line number of the caller.

This information is not always available.


getMethodName

public String getMethodName()
Returns the method name of the caller.


toString

public String toString()
Overrides:
toString in class Object

isNativeMethod

public boolean isNativeMethod()

Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.