org.exolab.castor.util
Class CmdLineOption

java.lang.Object
  extended by org.exolab.castor.util.CmdLineOption

 class CmdLineOption
extends java.lang.Object


Constructor Summary
CmdLineOption(java.lang.String flag)
          Creates a new CmdLineOption.
 
Method Summary
 java.lang.String getComment()
          Returns the comment for this option.
 java.lang.String getFlag()
          Returns the flag associated with this command line option.
 boolean getOptional()
          Returns whether or not this CmdLineOption is optional or not.
 java.lang.String getUsageText()
          Returns the text to print after the flag when printing the usage line.
 void setComment(java.lang.String comment)
          Sets a comment for the flag.
 void setOptional(boolean optional)
          Sets whether or not this CmdLineOption is optional or not.
 void setUsageText(java.lang.String usageText)
          Sets the text to print after the flag when printing the usage line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmdLineOption

CmdLineOption(java.lang.String flag)
Creates a new CmdLineOption.

Parameters:
flag - The flag associated with this command line option.
Method Detail

getFlag

public java.lang.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.

getComment

public java.lang.String getComment()
Returns the comment for this option.

Returns:
the comment for this command line option.

getUsageText

public java.lang.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.

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.

setComment

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

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

setUsageText

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

Parameters:
usageText - the usage text.


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