com.sun.grid.jgdi.util.shell
Class OptionDescriptor

java.lang.Object
  extended by com.sun.grid.jgdi.util.shell.OptionDescriptor

public class OptionDescriptor
extends java.lang.Object

Describes command option parameters as cache entry


Constructor Summary
OptionDescriptor(java.lang.String option, java.lang.String defaultArg, int mandatory, int optional, java.lang.reflect.Method method, java.io.PrintWriter out, java.io.PrintWriter err)
          Constructor
 
Method Summary
 java.lang.String getDefaultArg()
           
 java.io.PrintWriter getErr()
          Getter method
 int getMandatoryArgCount()
          Getter method
 int getMaxArgCount()
          Gets sum of mandatory and optional arguments
 java.lang.reflect.Method getMethod()
          Getter method
 java.lang.String getOption()
          Getter method
 int getOptionalArgCount()
          Getter method
 java.io.PrintWriter getOut()
          Getter method
 boolean isMultiple()
          Getter method
 boolean isWithoutArgs()
          Getter method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionDescriptor

public OptionDescriptor(java.lang.String option,
                        java.lang.String defaultArg,
                        int mandatory,
                        int optional,
                        java.lang.reflect.Method method,
                        java.io.PrintWriter out,
                        java.io.PrintWriter err)
                 throws java.lang.InstantiationException,
                        java.lang.IllegalAccessException
Constructor

Parameters:
option - - option string
mandatory - - number of mandatory arguments
optional - - number of optional arguments
method - - command method to execute
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
Method Detail

getMandatoryArgCount

public int getMandatoryArgCount()
Getter method

Returns:
value

getOptionalArgCount

public int getOptionalArgCount()
Getter method

Returns:
value

getMaxArgCount

public int getMaxArgCount()
Gets sum of mandatory and optional arguments

Returns:
int sum of mandatory and optional arguments

isWithoutArgs

public boolean isWithoutArgs()
Getter method

Returns:
value

isMultiple

public boolean isMultiple()
Getter method

Returns:
value

getMethod

public java.lang.reflect.Method getMethod()
Getter method

Returns:
value

getOption

public java.lang.String getOption()
Getter method

Returns:
value

getOut

public java.io.PrintWriter getOut()
Getter method

Returns:
value

getErr

public java.io.PrintWriter getErr()
Getter method

Returns:
value

getDefaultArg

public java.lang.String getDefaultArg()


Copyright © 2007 Sun Microsystems, Inc. All rights reserved.