public class VariableTable
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static I18NHelper |
msg
I18N support
|
Constructor and Description |
---|
VariableTable() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkDeclaredIdentifier(java.lang.String name,
Declaration decl)
Internal method to check whether the specified identifier is declared.
|
void |
declare(Declaration decl)
Adds a new declaration.
|
VariableTable |
getCopy()
Returns a copy of this VariableTable.
|
java.lang.Object |
getValue(java.lang.String name)
Returns the current value for the specified identifier.
|
void |
initValueHandling()
This method initializes the map of values for this ValueTable.
|
boolean |
isCompatibleValue(java.lang.String name,
java.lang.Object value)
Checks whether the type of the specified value is compatible of the type
of the identifier from its declaration.
|
void |
setValue(java.lang.String name,
java.lang.Object value)
Sets the value for the specified identifier.
|
protected static final I18NHelper msg
public VariableTable getCopy()
protected void checkDeclaredIdentifier(java.lang.String name, Declaration decl)
public void declare(Declaration decl)
declare
in interface ValueTable
decl
- the declaration nodepublic void initValueHandling()
public void setValue(java.lang.String name, java.lang.Object value)
setValue
in interface ValueTable
name
- the name of the identifiervalue
- the current value of the identifierpublic java.lang.Object getValue(java.lang.String name)
getValue
in interface ValueTable
name
- the name of the identifierpublic boolean isCompatibleValue(java.lang.String name, java.lang.Object value)
isCompatibleValue
in interface ValueTable
name
- the name of the identifiervalue
- the value to be checkedtrue
if the type of the value is compatible with the
type of the identifier; false
otherwise.Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.