1 23 package com.sun.appserv.management.util.jmx.stringifier; 24 25 import java.lang.reflect.Array ; 26 import javax.management.MBeanConstructorInfo ; 27 28 import com.sun.appserv.management.util.stringifier.Stringifier; 29 30 31 public class MBeanConstructorInfoStringifier extends MBeanFeatureInfoStringifier implements Stringifier 32 { 33 public static final MBeanConstructorInfoStringifier DEFAULT = 34 new MBeanConstructorInfoStringifier(); 35 36 37 public 38 MBeanConstructorInfoStringifier() 39 { 40 super( ); 41 } 42 43 public 44 MBeanConstructorInfoStringifier( MBeanFeatureInfoStringifierOptions options ) 45 { 46 super( options ); 47 } 48 49 public String 50 stringify( Object o ) 51 { 52 final MBeanConstructorInfo constructor = (MBeanConstructorInfo )o; 53 54 final String name = constructor.getName(); 55 final int lastDot = name.lastIndexOf( "." ); 56 final String abbreviatedName = name.substring( lastDot + 1, name.length() ); 57 58 final String params = "(" + 59 ParamsToString( constructor.getSignature(), mOptions ) + ")"; 60 61 return( abbreviatedName + params ); 62 } 63 } 64 | Popular Tags |