com.ibm.commerce.foundation.common.util.logging

Class TraceHelper

  • java.lang.Object
    • com.ibm.commerce.foundation.common.util.logging.TraceHelper


  • public class TraceHelper
    extends java.lang.Object
    Helper class for Trace.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String printDataGraph(commonj.sdo.DataGraph dataGraph)
      Prints an SDO data graph.
      static java.lang.String printDataObject(commonj.sdo.DataObject dataObject)
      Prints an SDO data object.
      static java.lang.String printLargeCollection(java.util.Collection collection)
      This method will return a String that represents the specified collection.
      static java.lang.String printObjectArray(java.lang.Object[] aarrObjects)
      Helper method to print out an array of objects.
      static java.lang.String toString(java.util.Map map)
      This method will return the string representation of the specified Map object.
      • Methods inherited from class java.lang.Object

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

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright
        See Also:
        Constant Field Values
    • Method Detail

      • printDataObject

        public static java.lang.String printDataObject(commonj.sdo.DataObject dataObject)
        Prints an SDO data object.
        Parameters:
        dataObject - The data object to print
        Returns:
        A String representation of the data object
      • printDataGraph

        public static java.lang.String printDataGraph(commonj.sdo.DataGraph dataGraph)
        Prints an SDO data graph.
        Parameters:
        dataGraph - The data graph to print.
        Returns:
        A String representation of the data graph.
      • printObjectArray

        public static final java.lang.String printObjectArray(java.lang.Object[] aarrObjects)
        Helper method to print out an array of objects. To be used for tracing purposes.
        Parameters:
        aarrObjects - Array of objects to be printed for tracing
        Returns:
        The string representation of the array; format [obj1,obj2,...]
      • printLargeCollection

        public static final java.lang.String printLargeCollection(java.util.Collection collection)
        This method will return a String that represents the specified collection. This method assumes the collection is very large so it will only return the string representation of the first 3 elements and indicates the length of the collection.
        Parameters:
        collection - The collection to convert to a string.
        Returns:
        The string representation of the large list.
      • toString

        public static java.lang.String toString(java.util.Map map)
        This method will return the string representation of the specified Map object. The string representation will mask the value of the map where the key is considered a sensitive parameter.
        Parameters:
        map - The map to convert to a string.
        Returns:
        A string representation of the map for debugging purposes.