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 public class MBeanNotificationInfoStringifier 38 extends MBeanFeatureInfoStringifier implements Stringifier 39 { 40 public final static MBeanNotificationInfoStringifier DEFAULT = new MBeanNotificationInfoStringifier( ); 41 42 public 43 MBeanNotificationInfoStringifier( ) 44 { 45 super( ); 46 } 47 48 public 49 MBeanNotificationInfoStringifier( MBeanFeatureInfoStringifierOptions options ) 50 { 51 super( options ); 52 } 53 54 public String 55 stringify( Object o ) 56 { 57 final MBeanNotificationInfo notif = (MBeanNotificationInfo)o; 58 59 String result = notif.getName() + ":"; 60 61 final String [] notifTypes = notif.getNotifTypes(); 62 result = result + ArrayStringifier.stringify( notifTypes, mOptions.mArrayDelimiter ); 63 64 if ( mOptions.mIncludeDescription ) 65 { 66 result = result + ",\"" + notif.getDescription() + "\""; 67 } 68 69 70 return( result ); 71 } 72 } | Popular Tags |