Package eu.bandm.tools.util3
Class JWhichOptions
@Generated(generator="eu.bandm.tools.option",
version="",
timestamp="2025-08-17_22h52m16")
public class JWhichOptions
extends Model<JWhichOptions>
Generated source for command line processing.
(A parallel GUI class has not been generated. The normal way of operation is:
(A parallel GUI class has not been generated. The normal way of operation is:
- Create a fresh instance by the only constructor
JWhichOptions(). - Analyse command line by invoking
Model.parse(String[],MessageReceiver,String) - Inquire whether a particular option X has been set on the commandline
by invoking
has_[X](). - The arguments of each option are
determined by a sequence of types: first a leading sequence,
values for which appear exactly once, followed by a sequence
which may be repeated. Both type sequences may be empty.
Inquire value of the options n-th argument in the fixed, leading argument sequence byget_[X]_[n](). - Inquire value of the
options n-th argument in the k-th repetition group by
get_[X]_[n](k).
If anything went wrong in parsing, errors have been sent to the MessageReceiver. Then further analysis methods can be
applied (Model.getParsingProtocol(), Model.getMissingOptions(), Model.usage(), etc.)
For further details. please see the documentation of
the methods inherited from the superclass Model and the option compiler's
user documentation.
Here is the source text.
There have been description texts only in one language, namely en.
The usage() method will show this screen:
======
USAGE:
======
--classpath string(="")
classpath
--package string(="")
package name
-0 / --target ( string(="") )+
target class name
--sourcefile string(="")
source file name
-v / --verbose boolean(=false)
log activity to stderr
-i / --anyinnerclasses boolean(=false)
search unqualified inner classes anywhere
Generated on 2025-08-17_22h52m16
by program bandm/metatools/option/compiler, version
command line =
by program bandm/metatools/option/compiler, version
command line =
java bandm/metatools/option/compiler JWhichOptions.xml eu.bandm.tools.util3 JWhichOptions $(HOME)/metatools/src
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassProgrammatically generated catalog of translations.classOne instance realizes one repeated argument group of optiontarget.Nested classes/interfaces inherited from class eu.bandm.tools.option.runtime.Model
Model.ExcDuplicate, Model.ExcEndOfRepet, Model.ExcNoData, Model.ExcNoData_allowed, Model.ExcSkipReachesEnd, Model.ExcUnknownOpt, Model.ExcWrongType, Model.Pre20220613, Model.SeemsToWorkForLinuxAndSomeWindowsVersions20220613 -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected List<JWhichOptions.Values_target> protected booleanprotected Stringprotected Stringprotected Stringprotected booleanFields inherited from class eu.bandm.tools.option.runtime.Model
curArg, curArgGroup, curOption, currentErrorPos, descriptions, dummyRat, GNU_VERSION_OPTION, hasNonMetaOptions, inputlength, inputstring, matcher, messages, msg, nextToken, optionDirector, p_rest, positionalPhase, positionalsExplicit, positionalsFound, protocol, shellAdapter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCallback, overridden by compiled code.Is overridden in the generated code and concatenates the "longest names" of all otions marked as required, but not present in the parsed input.Callback, overridden by compiled code.protected voidThe generated code will evaluate all conditions to activate/deactive options in the GUI.booleanGetter method for the only argument of optionanyinnerclasses.Getter method for the only argument of optionclasspath.Getter method for the only argument of optionpackage.Getter method for the only argument of optionsourcefile.Getter method for all repetition groups of optiontarget.get_target_0(int index) Getter method for the only repeated argument of optiontarget.booleanGetter method for the only argument of optionverbose.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.Overriden by the generated code to make a constructor call of the actual Model (sub-)class.protected intThe generated code will return the number of positional parameters.protected voidparseAbbrev(String select) Callback, overridden by compiled code, which realizes a switch over all one character option names.protected voidCallback, overridden by compiled code, which realizes a switch over all long option names.protected voidCallback, overridden by compiled code, which calls one after the other the positional parameters.Called to generate a String representation of the model's state.voidusage(PrintStream pr) Print usage information in the default language.voidusage(PrintStream pr, String lang) Print usage information in the requested language.voidusage_en()Print usage information in the language 'en' on System.err.voidusage_en(PrintStream pr) Print usage information in the language 'en'.Methods inherited from class eu.bandm.tools.option.runtime.Model
ARG_ERROR, ARG_ERROR, canReenterRepetitionGroup, convert_integer_10_or_16, descriptionKeyForCommentField, descriptionKeyForEnum, descriptionKeyForEnum, descriptionKeyForEnumItem, ERROR, ERROR_plus, ERROR_UNKNOWN_ABBREV, ERROR_UNKNOWN_NAME, getInputString, getMissingOptions, getNextToken, getNextToken_required, getParsingProtocol, HINT, input_as_its_own_id, INSITU, parse, parseBool, parseBool_optional, parseBoolTest, parseEnum, parseEnumSet, parseFloat, parseInit, parseInt, parseInt_16or10, parseOneString, parseOneString, parseOneString, parseOneUri, parseRational, parseString, putprot, putprot_option, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serialize_hex, skipToOption, type_error, TYPE_MISMATCH, TYPE_MISMATCH, usage, usage, WARNING
-
Field Details
-
has_classpath
protected boolean has_classpath -
value_classpath_0
-
has_package
protected boolean has_package -
value_package_0
-
has_target
protected boolean has_target -
repvalues_target
-
serialize_target
-
has_sourcefile
protected boolean has_sourcefile -
value_sourcefile_0
-
has_verbose
protected boolean has_verbose -
value_verbose_0
protected boolean value_verbose_0 -
has_anyinnerclasses
protected boolean has_anyinnerclasses -
value_anyinnerclasses_0
protected boolean value_anyinnerclasses_0
-
-
Constructor Details
-
JWhichOptions
public JWhichOptions()
-
-
Method Details
-
makeDefaultInstance
Description copied from class:ModelOverriden by the generated code to make a constructor call of the actual Model (sub-)class.- Specified by:
makeDefaultInstancein classModel<JWhichOptions>
-
checkActive
protected void checkActive()Description copied from class:ModelThe generated code will evaluate all conditions to activate/deactive options in the GUI.- Specified by:
checkActivein classModel<JWhichOptions>
-
has_classpath
Deprecated.- Returns:
- whether the option has been set on the command line.
(The result is of no significance when using GUI input, and should neither be used in command line mode.)
For details of this option see the method
get_classpath_0().
-
get_classpath_0
Getter method for the only argument of optionclasspath.This option indicates: classpath.
The format of this option on the command line is--classpath string(="") -
has_package
Deprecated.- Returns:
- whether the option has been set on the command line.
(The result is of no significance when using GUI input, and should neither be used in command line mode.)
For details of this option see the method
get_package_0().
-
get_package_0
Getter method for the only argument of optionpackage.This option indicates: package name.
The format of this option on the command line is--package string(="") -
has_target
Deprecated.- Returns:
- whether the option has been set on the command line.
(The result is of no significance when using GUI input, and should neither be used in command line mode.)
For details of this option see the method
get_target().
-
get_target
Getter method for all repetition groups of optiontarget.This option indicates: target class name.
The format of this option on the command line is-0 / --target ( string(="") )+
-
get_target_0
Getter method for the only repeated argument of optiontarget. For details of this option see the methodget_target().- Parameters:
index- the index of the repetition group, zero based.
-
has_sourcefile
Deprecated.- Returns:
- whether the option has been set on the command line.
(The result is of no significance when using GUI input, and should neither be used in command line mode.)
For details of this option see the method
get_sourcefile_0().
-
get_sourcefile_0
Getter method for the only argument of optionsourcefile.This option indicates: source file name.
The format of this option on the command line is--sourcefile string(="") -
has_verbose
Deprecated.- Returns:
- whether the option has been set on the command line.
(The result is of no significance when using GUI input, and should neither be used in command line mode.)
For details of this option see the method
get_verbose_0().
-
get_verbose_0
public boolean get_verbose_0()Getter method for the only argument of optionverbose.This option indicates: log activity to stderr.
The format of this option on the command line is-v / --verbose boolean(=false)
-
has_anyinnerclasses
Deprecated.- Returns:
- whether the option has been set on the command line.
(The result is of no significance when using GUI input, and should neither be used in command line mode.)
For details of this option see the method
get_anyinnerclasses_0().
-
get_anyinnerclasses_0
public boolean get_anyinnerclasses_0()Getter method for the only argument of optionanyinnerclasses.This option indicates: search unqualified inner classes anywhere.
The format of this option on the command line is-i / --anyinnerclasses boolean(=false)
-
serialize
Description copied from class:ModelCalled to generate a String representation of the model's state. Code is overridden by the compiled code.- Specified by:
serializein classModel<JWhichOptions>
-
usage
Print usage information in the default language.- Specified by:
usagein classModel<JWhichOptions>
-
usage
Print usage information in the requested language. Falls back to default language, if that language is not supported.- Specified by:
usagein classModel<JWhichOptions>
-
usage_en
public void usage_en()Print usage information in the language 'en' on System.err. -
usage_en
Print usage information in the language 'en'. -
parseAbbrev
Description copied from class:ModelCallback, overridden by compiled code, which realizes a switch over all one character option names. The generated code calls the argument parsers and stores the resulting values to the model's fields.- Specified by:
parseAbbrevin classModel<JWhichOptions>- Parameters:
select- the one-character option name, as parsed by this code.
-
parseName
Description copied from class:ModelCallback, overridden by compiled code, which realizes a switch over all long option names. The generated code calls the argument parsers and stores the resulting values to the model's fields.- Specified by:
parseNamein classModel<JWhichOptions>- Parameters:
select- the multi-character option name, as parsed by this code.
-
numberOfPositionals
protected int numberOfPositionals()Description copied from class:ModelThe generated code will return the number of positional parameters.- Specified by:
numberOfPositionalsin classModel<JWhichOptions>
-
parsePositionals
protected void parsePositionals()Description copied from class:ModelCallback, overridden by compiled code, which calls one after the other the positional parameters. Each of them corresponds to an implicit option (with short names "-0", "-1", "-2", ...). These can also be defined explicitly, e.g. be given a long name, etc. Anyhow, they can be set explicitly by their short name. If one single positional option is given explicitly, the implicit parsing of the others is suppressed and this code will not be called.- Specified by:
parsePositionalsin classModel<JWhichOptions>
-
_finalCheck
protected void _finalCheck()Description copied from class:ModelCallback, overridden by compiled code.- Specified by:
_finalCheckin classModel<JWhichOptions>
-
_getMissingOptions
Description copied from class:ModelIs overridden in the generated code and concatenates the "longest names" of all otions marked as required, but not present in the parsed input. Length==0 iff none is missing. Cf "sourcedtd required='yes'" in tools/tdom_withOptions/Options.xml- Specified by:
_getMissingOptionsin classModel<JWhichOptions>
-
_getRedundantOptions
Description copied from class:ModelCallback, overridden by compiled code.- Specified by:
_getRedundantOptionsin classModel<JWhichOptions>
-