Class FormalArgument
java.lang.Object
org.antlr.stringtemplate.language.FormalArgument
Represents the name of a formal argument
defined in a template:
group test;
test(a,b) : "$a$ $b$"
t() : "blort"
Each template has a set of these formal arguments or uses
a placeholder object: UNKNOWN (indicating that no arguments
were specified such as when a template is loaded from a file.st).
Note: originally, I tracked cardinality as well as the name of an
attribute. I'm leaving the code here as I suspect something may come
of it later. Currently, though, cardinality is not used.
-
Field Summary
FieldsModifier and TypeFieldDescriptionIf they specified name="value", store the template herestatic final int
static final int
static final int
static final String[]
static final LinkedHashMap
When template arguments are not available such as when the user uses "new StringTemplate(...)", then the list of formal arguments must be distinguished from the case where a template can specify args and there just aren't any such as the t() template above.static final int
-
Constructor Summary
ConstructorsConstructorDescriptionFormalArgument
(String name) FormalArgument
(String name, StringTemplate defaultValueST) -
Method Summary
-
Field Details
-
OPTIONAL
public static final int OPTIONAL- See Also:
-
REQUIRED
public static final int REQUIRED- See Also:
-
ZERO_OR_MORE
public static final int ZERO_OR_MORE- See Also:
-
ONE_OR_MORE
public static final int ONE_OR_MORE- See Also:
-
suffixes
-
UNKNOWN
When template arguments are not available such as when the user uses "new StringTemplate(...)", then the list of formal arguments must be distinguished from the case where a template can specify args and there just aren't any such as the t() template above. -
name
-
defaultValueST
If they specified name="value", store the template here
-
-
Constructor Details
-
FormalArgument
-
FormalArgument
-
-
Method Details