1 23 24 29 30 31 package com.sun.cli.jmx.support; 32 33 import com.sun.cli.util.stringifier.*; 34 35 public class InvokeResultStringifier implements Stringifier 36 { 37 public final static InvokeResultStringifier DEFAULT = new InvokeResultStringifier(); 38 39 public String 40 stringify( Object o ) 41 { 42 final InvokeResult r = (InvokeResult)o; 43 44 String str = "---" + r.mObjectName.toString() + "---\n"; 45 if ( r.mThrowable != null ) 46 { 47 str = str + "EXCEPTION: " + r.mThrowable.toString(); 48 } 49 else 50 { 51 if ( r.mResult == null ) 52 { 53 } 55 else 56 { 57 final SmartStringifier s = new SmartStringifier( StringifierRegistry.DEFAULT, "\n", false ); 58 59 str = str + s.stringify( r.mResult ); 60 } 61 } 62 63 return( str ); 64 } 65 } | Popular Tags |