1 23 24 29 30 package com.sun.cli.jmx.cmd; 31 32 import javax.management.ObjectName ; 33 34 import com.sun.cli.jmx.support.ResultsForGetSet; 35 import com.sun.cli.jmx.support.CLISupportMBeanProxy; 36 import com.sun.cli.util.stringifier.*; 37 38 public class ListAliasesCmd extends JMXCmd 39 { 40 public 41 ListAliasesCmd( final CmdEnv env ) 42 { 43 super( env ); 44 } 45 46 ArgHelper.OptionsInfo 47 getOptionInfo() 48 throws ArgHelper.IllegalOptionException 49 { 50 return( new ArgHelperOptionsInfo( ) ); 51 } 52 53 int 54 getNumRequiredOperands() 55 { 56 return( 0 ); 57 } 58 59 public String 60 getUsage() 61 { 62 return( CmdStrings.LIST_ALIASES_HELP.toString() ); 63 } 64 65 public static String [] 66 getNames( ) 67 { 68 return( new String [] { "list-aliases", "la" } ); 69 } 70 71 72 73 void 74 executeInternal() 75 throws Exception 76 { 77 final String [] aliases = getAliasMgr().listAliases( true ); 78 79 println( new SmartStringifier( "\n", false ).stringify( aliases ) ); 80 } 81 } 82 | Popular Tags |