@Immutable public abstract class TemplateParam extends Object
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Class and Description |
|---|---|
static class |
TemplateParam.DeclLoc
Enum for the location of the declaration.
|
VarDefn.Kind| Modifier and Type | Field and Description |
|---|---|
protected SoyType |
type
The data type of the value.
|
| Constructor and Description |
|---|
TemplateParam(String name,
SoyType type,
boolean isRequired,
boolean isInjected,
String desc) |
| Modifier and Type | Method and Description |
|---|---|
abstract TemplateParam |
copyEssential() |
abstract TemplateParam.DeclLoc |
declLoc()
Returns the location of the parameter declaration.
|
String |
desc() |
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isInjected()
Returns whether the param is required.
|
boolean |
isRequired()
Returns whether the param is required.
|
VarDefn.Kind |
kind()
What kind of variable this is (param, local var, etc).
|
int |
localVariableIndex()
Returns the index of this variable in the local variable table of the template or
-1
for ij params. |
String |
name()
The name of this variable.
|
void |
setLocalVariableIndex(int i)
Assigns the index of this variable in the local variable table for its containing template.
|
String |
toString() |
SoyType |
type()
Returns the data type of this variable.
|
protected SoyType type
public VarDefn.Kind kind()
VarDefnpublic abstract TemplateParam.DeclLoc declLoc()
public boolean isRequired()
public boolean isInjected()
public String desc()
public abstract TemplateParam copyEssential()
public SoyType type()
VarDefnpublic void setLocalVariableIndex(int i)
VarDefnsetLocalVariableIndex in interface VarDefnpublic int localVariableIndex()
VarDefn-1
for ij params.localVariableIndex in interface VarDefn