org.exolab.castor.util

Class CmdLineOption

class CmdLineOption extends Object

Field Summary
Stringcomment
Stringflag
booleanoptional
StringusageText
Constructor Summary
CmdLineOption(String flag)
Creates a new CmdLineOption
Method Summary
StringgetComment()
Returns the comment for this option
StringgetFlag()
Returns the flag associated with this command line option
booleangetOptional()
Returns whether or not this CmdLineOption is optional or not
StringgetUsageText()
Returns the text to print after the flag when printing the usage line
voidsetComment(String comment)
Sets a comment for the flag
voidsetOptional(boolean optional)
Sets whether or not this CmdLineOption is optional or not
voidsetUsageText(String usageText)
Sets the text to print after the flag when printing the usage line

Field Detail

comment

String comment

flag

String flag

optional

boolean optional

usageText

String usageText

Constructor Detail

CmdLineOption

CmdLineOption(String flag)
Creates a new CmdLineOption

Parameters: the flag associated with this command line option

Method Detail

getComment

public String getComment()
Returns the comment for this option

Returns: the comment for this command line option

getFlag

public String getFlag()
Returns the flag associated with this command line option

Returns: the flag associated with this command line option

getOptional

public boolean getOptional()
Returns whether or not this CmdLineOption is optional or not

Returns: true if this CmdLineOption is optional, otherwise false

getUsageText

public String getUsageText()
Returns the text to print after the flag when printing the usage line

Returns: the text to print after the flag when printing the usage line

setComment

public void setComment(String comment)
Sets a comment for the flag

Parameters: comment the comment to use when printing help for the given flag

setOptional

public void setOptional(boolean optional)
Sets whether or not this CmdLineOption is optional or not

Parameters: optional the flag indicating whether or not this CmdLineOption is optional

setUsageText

public void setUsageText(String usageText)
Sets the text to print after the flag when printing the usage line

Parameters: usageText the usage text

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com