protected class Compiler.Phase1 extends Compiler.Phase
desrcibes_argument_types.serializeText descriptions
(Only for options, not enums)| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Element_option> |
abbrev2el
Lists option definitions by their short naes.
|
protected String |
cmd_checkActive
Accumulator for generated java code to check the activity of the visited option.
|
protected StringBuilder |
cmd_usage
Accumulator for the user documentation of the argument types sequecen of the
visited option.
|
protected Map<String,Element_option> |
name2el
Lists option definitions by their long naes.
|
protected Map<Integer,Element_option> |
pos
Lists option definitions iff their short name is a decimal digit.
|
protected String |
serializeText
Accumulator for the generated java code for the serialization of the visited option.
|
protected String |
usage_checkActive
Accumulator for the user documentation of the activity condition of the visited option.
|
abbrev, currentOptionElement, name, option_qualifiervalidating| Modifier | Constructor and Description |
|---|---|
protected |
Phase1() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFullCommentOrCrossRef(GeneratedMethod m)
For the first call, put the (English) documentation text and arguments' regExp
to that method, as a pars-pro-toto; later put references to that first method.
|
protected void |
addLinkComment(GeneratedAnnotationTarget m)
Put the (English) documentation text which leads the user to the
pars-pro-toto
documentedMeth. |
protected void |
addLinkCommentEXT(GeneratedAnnotationTarget gm,
String name)
Put the (English) documentation text which leads the user to the
pars-pro-toto
documentedMeth contained in a diffrent class. |
void |
makeNoArgSwitch()
Make a special boolean value field plus methods plus usage() documentation for a
"switch type" / "flag type" option.
|
protected void |
makeValueField(MetaType cl,
@Opt TypedAttribute<String> userdef,
String defdef)
Convenience method to prcess one single position of an option's type
structure which is neither String nor enumeratin nor switch.
|
protected void |
makeValueField(MetaType cl,
@Opt TypedAttribute<String> userdef,
String defdef,
boolean isString,
@Opt String enumname,
boolean isSwitch)
Central method for processing one single position of an options's type signature.
|
void |
visit(Element_and el)
Stores Java source and user documentation for the "and" combinator in an
enabling condition.
|
void |
visit(Element_bool el)
Make value field plus methods plus usage() documentation for a boolean type argument.
|
void |
visit(Element_comment element)
Here only the text translations are collected and stored under
a dedicated key, which is entered in
#comment_keys. |
void |
visit(Element_constant el)
Stores Java source and user documentation for a constant in an enabling condition.
|
void |
visit(Element_enum el)
Make value field plus methods plus usage() documentation for an enumeration
type argument.
|
void |
visit(Element_enumeration element)
Do nothing and DO NOT descend.
|
void |
visit(Element_enumset el)
Make value field plus methods plus usage() documentation for an enum set
type argument.
|
void |
visit(Element_float el)
Make value field plus methods plus usage() documentation for a float type argument.
|
void |
visit(Element_int el)
Make value field plus methods plus usage() documentation for an int type argument.
|
void |
visit(Element_not el)
Stores Java source and user documentation for the "not" combinator in an
enabling condition.
|
void |
visit(Element_optarg el)
Stores Java source and user documentation for the reference to an option's arguemt
in an enabling condition.
|
void |
visit(Element_option element)
See description of containing class
Compiler.Phase1 |
void |
visit(Element_optionlist element)
Entry point; initialize the global data to collect and on return compiles
some of it into generated source.
|
void |
visit(Element_or el)
Stores Java source and user documentation for the "or" combinator in an
enabling condition.
|
void |
visit(Element_rat el)
Make value field plus methods plus usage() documentation for a rational type argument.
|
void |
visit(Element_rep el)
Generate a class representing the repeting goup and fill this with
field and method definitions using the same methods as implied for the
top-level
Model. |
void |
visit(Element_string el)
Make value field plus methods plus usage() documentation for a String type argument.
|
void |
visit(Element_testequal el)
Stores Java source and user documentation for the equality test in an
enabling condition.
|
void |
visit(Element_testgreater el)
Stores Java source and user documentation for the "is grater" combinator in an
enabling condition.
|
void |
visit(Element_text el)
Memorize description text for gui tool-tips.
|
void |
visit(Element_uri el)
Make value field plus methods plus usage() documentation for an
URI / file path type argument.
|
bothtags_formatted, bothtags, ERROR, longestname, longesttag, shortestname, shortesttag, WARNINGvisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitvisitprotected StringBuilder cmd_usage
protected String cmd_checkActive
protected String usage_checkActive
protected String serializeText
protected Map<String,Element_option> name2el
protected Map<String,Element_option> abbrev2el
protected Map<Integer,Element_option> pos
public void visit(Element_enumeration element)
public void visit(Element_comment element)
#comment_keys.
This must be done this early, so that a language appearing ONLY
in a comment (a rare case, probably erronuous) will
correctly be considered!public void visit(Element_optionlist element)
public void visit(Element_option element)
Compiler.Phase1visit in class Compiler.Phasepublic void visit(Element_text el)
Compiler.descriptions.
Element_comment and Element_enumeration are pruned by
this visitor code, so we come here only via
and then Element_desc.protected void addFullCommentOrCrossRef(GeneratedMethod m)
protected void addLinkComment(GeneratedAnnotationTarget m)
documentedMeth.protected void addLinkCommentEXT(GeneratedAnnotationTarget gm, String name)
documentedMeth contained in a diffrent class.
Currently only used from the repeting-group class to its containing
Model class.protected void makeValueField(MetaType cl, @Opt @Opt TypedAttribute<String> userdef, String defdef)
protected void makeValueField(MetaType cl, @Opt @Opt TypedAttribute<String> userdef, String defdef, boolean isString, @Opt @Opt String enumname, boolean isSwitch)
modelclass, including
its initializer and its getter method. It extends the serialization (un-parsing)
method and the signature documentation text.cl - the class of the model field to generate.userdef - (maybe null) the attribute carrying the default from the xml input.defdef - the default for the default value, if no default is
specified in the xml input.isString - the default value is inserted in the generated code literally,
so it must be additionally escaped iff it is a String.enumname - needed only as prefix for the default value / initializerisSwitch - is a argument-less option which only acts by mere presence.public void makeNoArgSwitch()
public void visit(Element_int el)
public void visit(Element_float el)
public void visit(Element_rat el)
public void visit(Element_bool el)
public void visit(Element_string el)
public void visit(Element_uri el)
public void visit(Element_enum el)
public void visit(Element_enumset el)
public void visit(Element_rep el)
Model.public void visit(Element_and el)
public void visit(Element_or el)
public void visit(Element_not el)
public void visit(Element_testequal el)
public void visit(Element_testgreater el)
public void visit(Element_constant el)
public void visit(Element_optarg el)
see also the complete user documentation .