Class LocationInfo

  • All Implemented Interfaces:
    java.io.Serializable

    public class LocationInfo
    extends java.lang.Object
    implements java.io.Serializable
    The internal representation of caller location information.
    Since:
    0.8.3
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String fullInfo  
      static java.lang.String NA
      When location information is not available the constant NA is returned.
      (package private) static long serialVersionUID  
      private java.lang.StackTraceElement stackTraceElement  
    • Constructor Summary

      Constructors 
      Constructor Description
      LocationInfo​(java.lang.StackTraceElement stackTraceElement)
      Constructs a new instance.
      LocationInfo​(java.lang.String file, java.lang.String declaringClass, java.lang.String methodName, java.lang.String line)
      Constructs a new instance.
      LocationInfo​(java.lang.Throwable throwable, java.lang.String fqnOfCallingClass)
      Constructs a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getClassName()
      Gets the fully qualified class name of the caller making the logging request.
      java.lang.String getFileName()
      Gets the file name of the caller.
      java.lang.String getLineNumber()
      Gets the line number of the caller.
      java.lang.String getMethodName()
      Gets the method name of the caller.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NA

        public static final java.lang.String NA
        When location information is not available the constant NA is returned. Current value of this string constant is ?.
        See Also:
        Constant Field Values
      • stackTraceElement

        private final java.lang.StackTraceElement stackTraceElement
      • fullInfo

        public java.lang.String fullInfo
    • Constructor Detail

      • LocationInfo

        public LocationInfo​(java.lang.StackTraceElement stackTraceElement)
        Constructs a new instance.
      • LocationInfo

        public LocationInfo​(java.lang.String file,
                            java.lang.String declaringClass,
                            java.lang.String methodName,
                            java.lang.String line)
        Constructs a new instance.
        Parameters:
        file - source file name
        declaringClass - class name
        methodName - method
        line - source line number
        Since:
        1.2.15
      • LocationInfo

        public LocationInfo​(java.lang.Throwable throwable,
                            java.lang.String fqnOfCallingClass)
        Constructs a new instance.
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
        Gets the fully qualified class name of the caller making the logging request.
      • getFileName

        public java.lang.String getFileName()
        Gets the file name of the caller.
      • getLineNumber

        public java.lang.String getLineNumber()
        Gets the line number of the caller.
      • getMethodName

        public java.lang.String getMethodName()
        Gets the method name of the caller.