FileDocCategorySizeDatePackage
CompositeDataStringifier.javaAPI DocGlassfish v2 API3122Fri May 04 22:31:04 BST 2007com.sun.appserv.management.util.jmx.stringifier

CompositeDataStringifier

public class CompositeDataStringifier extends Object implements com.sun.appserv.management.util.stringifier.Stringifier

Fields Summary
public static final CompositeDataStringifier
DEFAULT
Constructors Summary
public CompositeDataStringifier()

	
		
	 
	
	
Methods Summary
public java.lang.Stringstringify(java.lang.Object o)

		final StringBuffer	buf	= new StringBuffer();
		buf.append( "Composite data:\n" );
		
		final CompositeData	data	= (CompositeData)o;
		final CompositeType	type	= data.getCompositeType();
		
		final Set		keySet	= type.keySet();
		final Iterator	iter	= keySet.iterator();
		while ( iter.hasNext() )
		{
			final String	key	= (String)iter.next();
			final Object	item	= data.get( key );
			
			final String	s	= SmartStringifier.toString( item );
			buf.append( key + "=" + s + "\n" );
		}
		
		return( buf.toString() );