Forge - Shell API 1.2.0.Final

org.jboss.forge.shell.command
Interface OptionMetadata


public interface OptionMetadata

Defines an option.

Author:
Lincoln Baxter, III

Method Summary
 Class<?> getBoxedType()
          Return the boxed type for this option.
 Class<? extends CommandCompleter> getCompleterType()
          Return the type of the CommandCompleter for this option.
 String getDefaultValue()
          Get the default value for this option.
 String getDescription()
          Get the description text for this option.
 String getHelp()
          Get the help text for this option.
 int getIndex()
          Get the index of this option in the receiving method signature parameter list.
 String getName()
          Get the name of this option.
 String getOptionDescriptor()
          Get the verbose description of this option.
 CommandMetadata getParent()
          Get the CommandMetadata defining this option.
 PromptType getPromptType()
          Get the requested PromptType for this option.
 String getShortName()
          Get the short name for this option, if it exists; otherwise, return empty string.
 Class<?> getType()
          Get the literal type of this option.
 boolean hasCustomCompleter()
          Return true if this option specifies a custom CommandCompleter.
 boolean hasDefaultValue()
          Return true if this option has a default value.
 boolean isBoolean()
          Return true if this option is a boolean type.
 boolean isEnum()
          Return true if this option is an enum type.
 boolean isFlagOnly()
          Return true if this option is only a flag, and only has a short name, taking no value on the command line.
 boolean isNamed()
          Return true if this option is named.
 boolean isOrdered()
          Return true if this option is not named, and must be specified by order.
 boolean isPipeIn()
          Return true if this option is the PipeIn
 boolean isPipeOut()
          Return true if this option is the PipeOut
 boolean isRequired()
          Return true if this option is required, and cannot be omitted on the command line.
 boolean isVarargs()
          Return true if this option accepts multiple values on the command line.
 boolean notOrdered()
          Return true if this option is not ordered: E.g.
 

Method Detail

getBoxedType

Class<?> getBoxedType()
Return the boxed type for this option. E.g: If the literal type is 'int', the boxed type is Integer


getCompleterType

Class<? extends CommandCompleter> getCompleterType()
Return the type of the CommandCompleter for this option.


getDefaultValue

String getDefaultValue()
Get the default value for this option. Default values are used when no value is passed from the command line.


getDescription

String getDescription()
Get the description text for this option.


getHelp

String getHelp()
Get the help text for this option.


getIndex

int getIndex()
Get the index of this option in the receiving method signature parameter list.


getName

String getName()
Get the name of this option.


getOptionDescriptor

String getOptionDescriptor()
Get the verbose description of this option.


getParent

CommandMetadata getParent()
Get the CommandMetadata defining this option.


getPromptType

PromptType getPromptType()
Get the requested PromptType for this option.


getShortName

String getShortName()
Get the short name for this option, if it exists; otherwise, return empty string.


getType

Class<?> getType()
Get the literal type of this option.


hasCustomCompleter

boolean hasCustomCompleter()
Return true if this option specifies a custom CommandCompleter.


hasDefaultValue

boolean hasDefaultValue()
Return true if this option has a default value.


isBoolean

boolean isBoolean()
Return true if this option is a boolean type.


isEnum

boolean isEnum()
Return true if this option is an enum type.


isFlagOnly

boolean isFlagOnly()
Return true if this option is only a flag, and only has a short name, taking no value on the command line.


isNamed

boolean isNamed()
Return true if this option is named.


isOrdered

boolean isOrdered()
Return true if this option is not named, and must be specified by order.


isPipeIn

boolean isPipeIn()
Return true if this option is the PipeIn


isPipeOut

boolean isPipeOut()
Return true if this option is the PipeOut


isRequired

boolean isRequired()
Return true if this option is required, and cannot be omitted on the command line.


isVarargs

boolean isVarargs()
Return true if this option accepts multiple values on the command line.


notOrdered

boolean notOrdered()
Return true if this option is not ordered: E.g. It may be named, or may be a PipeIn or PipeOut


Forge - Shell API 1.2.0.Final

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.