class_body
{ "{"
block_comment "/** long option */"
field_declaration
modifiers
private "private"
static "static"
type_identifier "String"
variable_declarator
identifier "longopt"
; ";"
block_comment "/** option description */"
field_declaration
modifiers
private "private"
static "static"
type_identifier "String"
variable_declarator
identifier "description"
; ";"
block_comment "/** argument name */"
field_declaration
modifiers
private "private"
static "static"
type_identifier "String"
variable_declarator
identifier "argName"
; ";"
block_comment "/** is required? */"
field_declaration
modifiers
private "private"
static "static"
boolean_type "boolean"
variable_declarator
identifier "required"
; ";"
block_comment "/** the number of arguments */"
field_declaration
modifiers
private "private"
static "static"
integral_type
int "int"
variable_declarator
identifier "numberOfArgs"
= "="
field_access
identifier "Option"
. "."
identifier "UNINITIALIZED"
; ";"
block_comment "/** option type */"
field_declaration
modifiers
private "private"
static "static"
type_identifier "Object"
variable_declarator
identifier "type"
; ";"
block_comment "/** option can have an optional argument value */"
field_declaration
modifiers
private "private"
static "static"
boolean_type "boolean"
variable_declarator
identifier "optionalArg"
; ";"
block_comment "/** value separator for argument value */"
field_declaration
modifiers
private "private"
static "static"
integral_type
char "char"
variable_declarator
identifier "valuesep"
; ";"
block_comment "/** option builder instance */"
field_declaration
modifiers
private "private"
static "static"
type_identifier "OptionBuilder"
variable_declarator
identifier "instance"
= "="
object_creation_expression
new "new"
type_identifier "OptionBuilder"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * private constructor to prevent instances being cr"...
constructor_declaration
modifiers
private "private"
identifier "OptionBuilder"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
line_comment "// hide the constructor"
} "}"
block_comment "/**\n * Resets the member variables to their default valu"...
method_declaration (+72 nodes collapsed)
block_comment "/**\n * The next Option created will have the following l"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * The next Option created will require an argument "...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * The next Option created will require an argument "...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * The next Option created will have the specified a"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * The next Option created will be required.\n *\n"...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * The next Option created uses <code>sep</code> as "...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * The next Option created uses '<code>=</code>' as "...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * The next Option created will be required if <code"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * The next Option created can have unlimited argume"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * The next Option created can have <code>num</code>"...
method_declaration (+29 nodes collapsed)
block_comment "/**\n * The next Option can have an optional argument.\n "...
method_declaration (+34 nodes collapsed)
block_comment "/**\n * The next Option can have an unlimited number of o"...
method_declaration (+37 nodes collapsed)
block_comment "/**\n * The next Option can have the specified number of "...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * The next Option created will have a value that wi"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * The next Option created will have the specified d"...
method_declaration (+28 nodes collapsed)
block_comment "/**\n * Create an Option using the current settings and w"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Create an Option using the current settings\n "...
method_declaration (+58 nodes collapsed)
block_comment "/**\n * Create an Option using the current settings and w"...
method_declaration
modifiers
public "public"
static "static"
type_identifier "Option"
identifier "create"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "opt"
) ")"
throws
throws "throws"
type_identifier "IllegalArgumentException"
block
{ "{"
line_comment "// create the option"
local_variable_declaration
type_identifier "Option"
variable_declarator
identifier "option" all 1:2
= "=" all 1:2
object_creation_expression
new "new"
type_identifier "Option"
argument_list
( "("
identifier "opt"
, ","
identifier "description"
) ")"
; ";" all 1:2
line_comment "// set the option properties"
expression_statement
method_invocation
identifier "option"
. "."
identifier "setLongOpt"
argument_list
( "("
identifier "longopt"
) ")"
; ";"
expression_statement
method_invocation
identifier "option"
. "."
identifier "setRequired"
argument_list
( "("
identifier "required"
) ")"
; ";"
expression_statement
method_invocation
identifier "option"
. "."
identifier "setOptionalArg"
argument_list
( "("
identifier "optionalArg"
) ")"
; ";"
expression_statement
method_invocation
identifier "option"
. "."
identifier "setArgs"
argument_list
( "("
identifier "numberOfArgs"
) ")"
; ";"
expression_statement
method_invocation
identifier "option"
. "."
identifier "setType"
argument_list
( "("
identifier "type"
) ")"
; ";"
expression_statement
method_invocation
identifier "option"
. "."
identifier "setValueSeparator"
argument_list
( "("
identifier "valuesep"
) ")"
; ";"
expression_statement
method_invocation
identifier "option"
. "."
identifier "setArgName"
argument_list
( "("
identifier "argName"
) ")"
; ";"
line_comment "// reset the OptionBuilder properties"
expression_statement
method_invocation
identifier "OptionBuilder"
. "."
identifier "reset"
argument_list
( "("
) ")"
; ";"
line_comment "// return the Option instance"
return_statement
return "return"
identifier "option"
; ";"
} "}"
} "}"