Package eu.bandm.tools.util3
Class JarLinkerOptions
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
JarLinkerOptions()
. - 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: ====== --main ( string(="") )+ the name(s) of the main class(es) which define reachability. The very first will be the *main* class in the jar file's Manifest. --exclude ( string(="") )+ names of packages and subtrees to exclude. "a.b.c" is a package all classes in which will not be included. "a.b..." (three triling dots) is a subtree: all packages with this prefix will be excluded. --inputs ( uri(="") )+ the binary input sources in which to search for classes (directories or jar files) --output uri(="") the path to the jar file to generate --debug int(=0) the verbosity --ressourceDirs ( uri(="") string(="") )* pair of source/target, where to move directories of ressources The first is the source position in the file system, the second is a directory in the generated jar file. --manifest uri(="") base manifest file --seal boolean(=false) whether to seal all packages
Created on 2024-11-24_11h56m40
by program bandm/metatools/option/compiler, version 2.1
command line =
java bandm/metatools/option/compiler JarLinkerOptions.xml eu.bandm.tools.util3 JarLinkerOptions $(HOME)/metatools/src
by program bandm/metatools/option/compiler, version 2.1
command line =
java bandm/metatools/option/compiler JarLinkerOptions.xml eu.bandm.tools.util3 JarLinkerOptions $(HOME)/metatools/src
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Programmatically generated catalog of translations.class
One instance realizes one repeated argument group of optionexclude
.class
One instance realizes one repeated argument group of optioninputs
.class
One instance realizes one repeated argument group of optionmain
.class
One instance realizes one repeated argument group of optionressourceDirs
.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
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected List<JarLinkerOptions.Values_exclude>
protected List<JarLinkerOptions.Values_inputs>
protected List<JarLinkerOptions.Values_main>
protected List<JarLinkerOptions.Values_ressourceDirs>
protected int
protected String
protected String
protected boolean
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Callback, 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 void
The generated code will evaluate all conditions to activate/deactive options in the GUI.int
Getter method for the only argument of optiondebug
.Getter method for all repetition groups of optionexclude
.get_exclude_0
(int index) Getter method for the only repeated argument of optionexclude
.Getter method for all repetition groups of optioninputs
.get_inputs_0
(int index) Getter method for the only repeated argument of optioninputs
.get_main()
Getter method for all repetition groups of optionmain
.get_main_0
(int index) Getter method for the only repeated argument of optionmain
.Getter method for the only argument of optionmanifest
.Getter method for the only argument of optionoutput
.Getter method for all repetition groups of optionressourceDirs
.get_ressourceDirs_0
(int index) Getter method for the 0th in a group of repeated arguments of optionressourceDirs
.get_ressourceDirs_1
(int index) Getter method for the 1st in a group of repeated arguments of optionressourceDirs
.boolean
Getter method for the only argument of optionseal
.boolean
Deprecated.boolean
Deprecated.boolean
Deprecated.boolean
has_main()
Deprecated.boolean
Deprecated.boolean
Deprecated.boolean
Deprecated.boolean
has_seal()
Deprecated.Overriden by the generated code to make a constructor call of the actual Model (sub-)class.protected int
The generated code will return the number of positional parameters.protected void
parseAbbrev
(String select) Callback, overridden by compiled code, which realizes a switch over all one character option names.protected void
Callback, overridden by compiled code, which realizes a switch over all long option names.protected void
Callback, overridden by compiled code, which calls one after the other the positional parameters.Called to generate a String representation of the model's state.void
usage
(PrintStream pr) Print usage information in the default language.void
usage
(PrintStream pr, String lang) Print usage information in the requested language.void
usage_en()
Print usage information in the language 'en' on System.err.void
usage_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_main
protected boolean has_main -
repvalues_main
-
serialize_main
-
has_exclude
protected boolean has_exclude -
repvalues_exclude
-
serialize_exclude
-
has_inputs
protected boolean has_inputs -
repvalues_inputs
-
serialize_inputs
-
has_output
protected boolean has_output -
value_output_0
-
has_debug
protected boolean has_debug -
value_debug_0
protected int value_debug_0 -
has_ressourceDirs
protected boolean has_ressourceDirs -
repvalues_ressourceDirs
-
serialize_ressourceDirs
-
has_manifest
protected boolean has_manifest -
value_manifest_0
-
has_seal
protected boolean has_seal -
value_seal_0
protected boolean value_seal_0
-
-
Constructor Details
-
JarLinkerOptions
public JarLinkerOptions()
-
-
Method Details
-
makeDefaultInstance
Description copied from class:Model
Overriden by the generated code to make a constructor call of the actual Model (sub-)class.- Specified by:
makeDefaultInstance
in classModel<JarLinkerOptions>
-
checkActive
protected void checkActive()Description copied from class:Model
The generated code will evaluate all conditions to activate/deactive options in the GUI.- Specified by:
checkActive
in classModel<JarLinkerOptions>
-
has_main
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_main()
.
-
get_main
Getter method for all repetition groups of optionmain
.This option indicates: the name(s) of the main class(es) which define reachability. The very first will be the *main* class in the jar file's Manifest.
The format of this option on the command line is--main ( string(="") )+
-
get_main_0
Getter method for the only repeated argument of optionmain
. For details of this option see the methodget_main()
.- Parameters:
index
- the index of the repetition group, zero based.
-
has_exclude
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_exclude()
.
-
get_exclude
Getter method for all repetition groups of optionexclude
.This option indicates: names of packages and subtrees to exclude. "a.b.c" is a package all classes in which will not be included. "a.b..." (three triling dots) is a subtree: all packages with this prefix will be excluded.
The format of this option on the command line is--exclude ( string(="") )+
-
get_exclude_0
Getter method for the only repeated argument of optionexclude
. For details of this option see the methodget_exclude()
.- Parameters:
index
- the index of the repetition group, zero based.
-
has_inputs
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_inputs()
.
-
get_inputs
Getter method for all repetition groups of optioninputs
.This option indicates: the binary input sources in which to search for classes (directories or jar files).
The format of this option on the command line is--inputs ( uri(="") )+
-
get_inputs_0
Getter method for the only repeated argument of optioninputs
. For details of this option see the methodget_inputs()
.- Parameters:
index
- the index of the repetition group, zero based.
-
has_output
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_output_0()
.
-
get_output_0
Getter method for the only argument of optionoutput
.This option indicates: the path to the jar file to generate.
The format of this option on the command line is--output uri(="")
-
has_debug
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_debug_0()
.
-
get_debug_0
public int get_debug_0()Getter method for the only argument of optiondebug
.This option indicates: the verbosity.
The format of this option on the command line is--debug int(=0)
-
has_ressourceDirs
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_ressourceDirs()
.
-
get_ressourceDirs
Getter method for all repetition groups of optionressourceDirs
.This option indicates: pair of source/target, where to move directories of ressources The first is the source position in the file system, the second is a directory in the generated jar file.
The format of this option on the command line is--ressourceDirs ( uri(="") string(="") )*
-
get_ressourceDirs_0
Getter method for the 0th in a group of repeated arguments of optionressourceDirs
. For details of this option see the methodget_ressourceDirs()
.- Parameters:
index
- the index of the repetition group, zero based.
-
get_ressourceDirs_1
Getter method for the 1st in a group of repeated arguments of optionressourceDirs
. For details of this option see the methodget_ressourceDirs()
.- Parameters:
index
- the index of the repetition group, zero based.
-
has_manifest
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_manifest_0()
.
-
get_manifest_0
Getter method for the only argument of optionmanifest
.This option indicates: base manifest file.
The format of this option on the command line is--manifest uri(="")
-
has_seal
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_seal_0()
.
-
get_seal_0
public boolean get_seal_0()Getter method for the only argument of optionseal
.This option indicates: whether to seal all packages.
The format of this option on the command line is--seal boolean(=false)
-
serialize
Description copied from class:Model
Called to generate a String representation of the model's state. Code is overridden by the compiled code.- Specified by:
serialize
in classModel<JarLinkerOptions>
-
usage
Print usage information in the default language.- Specified by:
usage
in classModel<JarLinkerOptions>
-
usage
Print usage information in the requested language. Falls back to default language, if that language is not supported.- Specified by:
usage
in classModel<JarLinkerOptions>
-
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:Model
Callback, 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:
parseAbbrev
in classModel<JarLinkerOptions>
- Parameters:
select
- the one-character option name, as parsed by this code.
-
parseName
Description copied from class:Model
Callback, 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:
parseName
in classModel<JarLinkerOptions>
- Parameters:
select
- the multi-character option name, as parsed by this code.
-
numberOfPositionals
protected int numberOfPositionals()Description copied from class:Model
The generated code will return the number of positional parameters.- Specified by:
numberOfPositionals
in classModel<JarLinkerOptions>
-
parsePositionals
protected void parsePositionals()Description copied from class:Model
Callback, 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:
parsePositionals
in classModel<JarLinkerOptions>
-
_finalCheck
protected void _finalCheck()Description copied from class:Model
Callback, overridden by compiled code.- Specified by:
_finalCheck
in classModel<JarLinkerOptions>
-
_getMissingOptions
Description copied from class:Model
Is 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:
_getMissingOptions
in classModel<JarLinkerOptions>
-
_getRedundantOptions
Description copied from class:Model
Callback, overridden by compiled code.- Specified by:
_getRedundantOptions
in classModel<JarLinkerOptions>
-