FileDocCategorySizeDatePackage
MBeanOperationInfoStringifier.javaAPI DocGlassfish v2 API3508Fri May 04 22:25:02 BST 2007com.sun.cli.util.stringifier

MBeanOperationInfoStringifier

public class MBeanOperationInfoStringifier extends MBeanFeatureInfoStringifier implements Stringifier

Fields Summary
public static MBeanOperationInfoStringifier
DEFAULT
Constructors Summary
public MBeanOperationInfoStringifier()

	
		
	  
	
		super( );
	
public MBeanOperationInfoStringifier(MBeanFeatureInfoStringifierOptions options)

		super( options );
	
Methods Summary
public java.lang.Stringstringify(java.lang.Object o)

		assert( o != null );

		final MBeanOperationInfo	op	= (MBeanOperationInfo)o;
		
		String	result	= getPresentationTypeString( op.getReturnType() ) + " " + op.getName() + "(";
		
		// create the signature string
		result	= result + ParamsToString( op.getSignature(), mOptions) + ")";
					
		String impactStr	= "";
		switch( op.getImpact() )
		{
			default:								impactStr	= "unknown";	break;
			case MBeanOperationInfo.INFO:			impactStr	= "info";		break;
			case MBeanOperationInfo.ACTION:			impactStr	= "action";		break;
			case MBeanOperationInfo.ACTION_INFO:	impactStr	= "action-info";break;
		}
		
		result	= result + sOperationDelimiter + "impact=" +impactStr;
			
		if ( mOptions.mIncludeDescription )
		{
			result	= result + sOperationDelimiter + "\"" + op.getDescription() + "\"";
		}
		
		return( result );