org.apache.ode.utils

## Class ObjectPrinter

- java.lang.Object
- - org.apache.ode.utils.ObjectPrinter

-     public class ObjectPrinter
      extends java.lang.Object

  Helper class for printing/formatting arbitrary objects.

  Created on Feb 17, 2004 at 3:53:54 PM.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ObjectPrinter()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `stringifyMethodEnter(java.lang.String methodName, java.lang.Object[] args)` Generate a default trace message for method entry.
    `static java.lang.String` | `stringifyNvList(java.lang.Object[] objects)` Stringify a staggered name-value list.
    `static java.lang.String` | `toString(java.lang.Object thiz, java.lang.Object[] objects)` A default `toString` implementation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ObjectPrinter

          public ObjectPrinter()

  - ### Method Detail

    - #### stringifyMethodEnter

          public static java.lang.String stringifyMethodEnter(java.lang.String methodName,
                                                              java.lang.Object[] args)

      Generate a default trace message for method entry.
      Parameters:
        `methodName` - method name
        `args` - method arguments (in staggered name-value array format) (see `stringifyNvList(java.lang.Object[])`)
      Returns:
        default trace message

    - #### stringifyNvList

          public static java.lang.String stringifyNvList(java.lang.Object[] objects)

      Stringify a staggered name-value list. Staggered NV-lists have the following form:`Object nvlist[] = { "name1", val1, "name2", val2, ... }`. The stringified representation looks like `name1=val,name2=val2,...` where the values are obtained from the `Object.toString()` method.
      Parameters:
        `objects` - staggered NV-list
      Returns:
        stringified representation

    - #### toString

          public static java.lang.String toString(java.lang.Object thiz,
                                                  java.lang.Object[] objects)

      A default `toString` implementation.
      Parameters:
        `thiz` - object for which to generate the string representation
        `objects` - a staggered name-value array.
      Returns:
        a concatenation of the object name and the name-value list