1 23 24 29 30 package com.sun.appserv.management.util.jmx.stringifier; 31 32 import com.sun.appserv.management.util.misc.ClassUtil; 33 34 import java.lang.reflect.Array ; 35 import javax.management.MBeanParameterInfo ; 36 37 import com.sun.appserv.management.util.stringifier.Stringifier; 38 import com.sun.appserv.management.util.stringifier.ArrayStringifier; 39 40 public class MBeanFeatureInfoStringifier 41 { 42 final MBeanFeatureInfoStringifierOptions mOptions; 43 44 public static final MBeanFeatureInfoStringifierOptions DEFAULT = 45 new MBeanFeatureInfoStringifierOptions( true, ","); 46 47 static final String sOperationDelimiter = ","; 48 49 MBeanFeatureInfoStringifier() 50 { 51 mOptions = DEFAULT; 52 } 53 54 MBeanFeatureInfoStringifier( MBeanFeatureInfoStringifierOptions options ) 55 { 56 mOptions = options; 57 } 58 59 60 61 static String 62 getPresentationTypeString( String type ) 63 { 64 return( ClassUtil.getFriendlyClassname( type ) ); 65 } 66 67 68 static String 69 ParamsToString( final MBeanParameterInfo [] params, final MBeanFeatureInfoStringifierOptions options ) 70 { 71 String result = ""; 72 73 if ( Array.getLength( params ) != 0 ) 74 { 75 result = ArrayStringifier.stringify( params, 76 options.mArrayDelimiter, 77 new MBeanParameterInfoStringifier( options ) ); 78 } 79 else 80 { 81 result = "void"; 82 } 83 return( result ); 84 } 85 86 87 88 } | Popular Tags |