com.sdm.quasar.client.core.common.logging
Class CallerInformation

java.lang.Object
  extended bycom.sdm.quasar.client.core.common.logging.CallerInformation

public class CallerInformation
extends java.lang.Object

An instance of this class stores some information about the caller of a logging method. Because it depends on the implementation of CallerInformationCalculator, which information can be achieved, the minimum required information for this class is the class name of the caller.

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
CallerInformation(java.lang.String loggerDomainName, java.lang.String className)
          Creates a new CallerInformation.
CallerInformation(java.lang.String loggerDomainName, java.lang.String fileName, java.lang.String className, int lineNumber, java.lang.String methodName)
          Creates a new CallerInformation.
 
Method Summary
 java.lang.String getCallerDomainName()
          Returns an optional domain name given by the logger caller.
 java.lang.String getClassName()
          Returns the fully qualified name of the class containing the execution point of the caller.
 java.lang.String getFileName()
          Returns the name of the source file containing the execution point of the caller.
 int getLineNumber()
          Returns the line number of the source line containing the execution point of the caller.
 java.lang.String getMethodName()
          Returns the name of the method containing the execution point of the caller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallerInformation

public CallerInformation(java.lang.String loggerDomainName,
                         java.lang.String fileName,
                         java.lang.String className,
                         int lineNumber,
                         java.lang.String methodName)
Creates a new CallerInformation.

Parameters:
fileName - the file name of the callers execution point (null if uknown)
className - the class name of the callers execution point (not null)
lineNumber - the line number of the callers execution point (-1 if unknown)
methodName - the method name of the callers execution point (null if uknown)

CallerInformation

public CallerInformation(java.lang.String loggerDomainName,
                         java.lang.String className)
Creates a new CallerInformation.

Parameters:
className - the class name of the caller (not null)
Method Detail

getCallerDomainName

public java.lang.String getCallerDomainName()
Returns an optional domain name given by the logger caller.


getFileName

public java.lang.String getFileName()
Returns the name of the source file containing the execution point of the caller.

Returns:
the name of the file containing the execution point of the caller - optional, may be null

getLineNumber

public int getLineNumber()
Returns the line number of the source line containing the execution point of the caller.

Returns:
the line number of the source line containing the execution point of the caller - optional, may be -1 if this information is unavailable.

getClassName

public java.lang.String getClassName()
Returns the fully qualified name of the class containing the execution point of the caller.

Returns:
the fully qualified name of the Class containing the execution point of the caller.

getMethodName

public java.lang.String getMethodName()
Returns the name of the method containing the execution point of the caller.

Returns:
the name of the method containing the execution point of the caller - optional, may be null