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