Package org.stringtemplate.v4.compiler
Class FormalArgument
- java.lang.Object
-
- org.stringtemplate.v4.compiler.FormalArgument
-
public class FormalArgument extends Object
Represents the name of a formal argument defined in a template:test(a,b,x=defaultvalue) ::= "<a> <n> <x>"
Each template has a set of these formal arguments or setsCompiledST.hasFormalArgs
tofalse
(indicating that no arguments were specified such as when we create a template withnew 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
Fields Modifier and Type Field Description CompiledST
compiledDefaultValue
Object
defaultValue
org.antlr.runtime.Token
defaultValueToken
If they specified default valuex=y
, store the token hereint
index
String
name
-
Constructor Summary
Constructors Constructor Description FormalArgument(String name)
FormalArgument(String name, org.antlr.runtime.Token defaultValueToken)
-
-
-
Field Detail
-
name
public String name
-
index
public int index
-
defaultValueToken
public org.antlr.runtime.Token defaultValueToken
If they specified default valuex=y
, store the token here
-
defaultValue
public Object defaultValue
-
compiledDefaultValue
public CompiledST compiledDefaultValue
-
-