* Adds a variable.
*/
public void addVariable(TldVariable variable)
throws ConfigException
{
TagVariableInfo varInfo;
String scopeName = variable.getScope();
int scope;
if (scopeName == null)
scope = VariableInfo.NESTED;
else if (scopeName.equals("NESTED"))
scope = VariableInfo.NESTED;
else if (scopeName.equals("AT_BEGIN"))
scope = VariableInfo.AT_BEGIN;
else if (scopeName.equals("AT_END"))
scope = VariableInfo.AT_END;
else
throw new ConfigException(L.l("{0} expects a valid scope at `{1}'",
variable.getNameGiven(), scopeName));
varInfo = new TagVariableInfo(variable.getNameGiven(),
variable.getNameFromAttribute(),
variable.getVariableClass(),
variable.getDeclare(),
scope);