public abstract class VariableSpec extends Object
A template expression can have one or more variable specifiers. For
instance, in {+path:3,var}, variable specifiers are path:3
and var.
This class records the name of this specifier and its modifier, if any.
| Modifier | Constructor and Description |
|---|---|
protected |
VariableSpec(VariableSpecType type,
String name) |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
equals(Object obj) |
String |
getName()
Get the name for this varspec
|
abstract int |
getPrefixLength()
Return the prefix length for this varspec
|
VariableSpecType |
getType()
Get the modifier type for this varspec
|
abstract int |
hashCode() |
abstract boolean |
isExploded()
Tell whether this varspec has an explode modifier
|
abstract String |
toString() |
protected final String name
protected VariableSpec(VariableSpecType type, String name)
public final VariableSpecType getType()
public final String getName()
public abstract boolean isExploded()
public abstract int getPrefixLength()
Returns -1 if no prefix length is specified. Recall: valid values are integers between 0 and 10000.