Class NormalizedParameters

    • Constructor Summary

      Constructors 
      Constructor Description
      NormalizedParameters​(java.lang.String message, java.lang.Object[] arguments)  
      NormalizedParameters​(java.lang.String message, java.lang.Object[] arguments, java.lang.Throwable throwable)  
    • Constructor Detail

      • NormalizedParameters

        public NormalizedParameters​(java.lang.String message,
                                    java.lang.Object[] arguments,
                                    java.lang.Throwable throwable)
      • NormalizedParameters

        public NormalizedParameters​(java.lang.String message,
                                    java.lang.Object[] arguments)
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
      • getThrowableCandidate

        public static java.lang.Throwable getThrowableCandidate​(java.lang.Object[] argArray)
        Helper method to determine if an Object array contains a Throwable as last element
        Parameters:
        argArray - The arguments off which we want to know if it contains a Throwable as last element
        Returns:
        if the last Object in argArray is a Throwable this method will return it, otherwise it returns null
      • trimmedCopy

        public static java.lang.Object[] trimmedCopy​(java.lang.Object[] argArray)
        Helper method to get all but the last element of an array
        Parameters:
        argArray - The arguments from which we want to remove the last element
        Returns:
        a copy of the array without the last element
      • normalize

        public static NormalizedParameters normalize​(java.lang.String msg,
                                                     java.lang.Object[] arguments,
                                                     java.lang.Throwable t)
        This method serves to normalize logging call invocation parameters. More specifically, if a throwable argument is not supplied directly, it attempts to extract it from the argument array.