Java EE 5 SDK

com.sun.appserv.management.util.stringifier
Class SmartStringifier

java.lang.Object
  extended by com.sun.appserv.management.util.stringifier.SmartStringifier
All Implemented Interfaces:
Stringifier

public final class SmartStringifier
extends Object
implements Stringifier

Stringifies an Object in the "best" possible way, using the StringifierRegistry.DEFAULT registry and/or internal logic.


Field Summary
static SmartStringifier DEFAULT
           
protected  StringifierRegistry mRegistry
           
 
Constructor Summary
SmartStringifier()
           
SmartStringifier(String multiDelim)
           
SmartStringifier(String multiDelim, boolean encloseArrays)
           
SmartStringifier(StringifierRegistry registry, String multiDelim, boolean encloseArrays)
           
 
Method Summary
 void setRegistry(StringifierRegistry registry)
           
 String stringify(Object target)
          Produce a String representation of an object.
static String toString(Object target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final SmartStringifier DEFAULT

mRegistry

protected StringifierRegistry mRegistry
Constructor Detail

SmartStringifier

public SmartStringifier()

SmartStringifier

public SmartStringifier(String multiDelim)

SmartStringifier

public SmartStringifier(String multiDelim,
                        boolean encloseArrays)

SmartStringifier

public SmartStringifier(StringifierRegistry registry,
                        String multiDelim,
                        boolean encloseArrays)
Method Detail

setRegistry

public void setRegistry(StringifierRegistry registry)

toString

public static String toString(Object target)

stringify

public String stringify(Object target)
Description copied from interface: Stringifier
Produce a String representation of an object. The actual output has no other semantics; each Stringifier may choose to target a particular type of user.

The resulting String should be suitable for display to a user.

Specified by:
stringify in interface Stringifier
Parameters:
target - the Object for which a String should be produced

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.