This class is immutable, and hence safe for use by multiple threads.
| Modifier and Type | Field and Description |
|---|---|
| private final int[] | myBaseSids
The base Sid of each symtab in |
| private final SymbolTable[] | myImports
The symtabs imported by a local symtab, never null or empty. |
| private final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | LocalSymbolTableImports(List<SymbolTable>
the imported symtabs, must contain at least one element; the
first element must be a system symtab, the rest must be
non-system shared symtabs importTables)Constructor, takes the passed-in |
| pack-priv | LocalSymbolTableImports(SymbolTable
the default system symtab, which will be used if the first
import in defaultSystemSymtab, SymbolTable... imports isn't a system symtab, never nullthe set of shared symbol tables to import; the first (and only
the first) may be a system table, in which case the
imports)defaultSystemSymtab is ignored
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | equalImports(LocalSymbolTableImports other)
Determines whether the passed-in instance has the same sequence of symbol table imports as this instance. |
| pack-priv SymbolToken | |
| pack-priv String | |
| pack-priv int | |
| pack-priv SymbolTable[] | Returns: a newly allocated copy of the imported symtabsGets all non-system shared symtabs (if any). |
| pack-priv SymbolTable[] | Returns: the backing array of imported symtabs, as-is; the first element is a system symtab, the rest are non-system shared symtabsReturns the |
| pack-priv int | |
| pack-priv SymbolTable | |
| private static int | Returns: the sum of all imports' maxIdsCollects the necessary maxId info. |
| public String |
| myBaseSids | back to summary |
|---|---|
| private final int[] myBaseSids The base Sid of each symtab in | |
| myImports | back to summary |
|---|---|
| private final SymbolTable[] myImports The symtabs imported by a local symtab, never null or empty. The first symtab must be a system symtab, the rest must be non-system shared symtabs. | |
| myMaxId | back to summary |
|---|---|
| private final int myMaxId The maxId of all imported tables, i.e., the sum of all maxIds declared
by symtabs in | |
| LocalSymbolTableImports | back to summary |
|---|---|
| pack-priv LocalSymbolTableImports(List<SymbolTable> importTables) Constructor, takes the passed-in
| |
| LocalSymbolTableImports | back to summary |
|---|---|
pack-priv LocalSymbolTableImports(SymbolTable defaultSystemSymtab, SymbolTable... imports)
| |
| equalImports | back to summary |
|---|---|
| pack-priv boolean equalImports(LocalSymbolTableImports other) Determines whether the passed-in instance has the same sequence of symbol table imports as this instance. Note that equality of these imports are checked using their reference, instead of their semantic state. | |
| find | back to summary |
|---|---|
| pack-priv SymbolToken find(String text) Finds a symbol already interned by an import, returning the lowest known SID. This method will not necessarily return the same instance given the same input.
| |
| findKnownSymbol | back to summary |
|---|---|
| pack-priv String findKnownSymbol(int sid) | |
| findSymbol | back to summary |
|---|---|
| pack-priv int findSymbol(String name) | |
| getImportedTables | back to summary |
|---|---|
| pack-priv SymbolTable[] getImportedTables() Gets all non-system shared symtabs (if any).
| |
| getImportedTablesNoCopy | back to summary |
|---|---|
| pack-priv SymbolTable[] getImportedTablesNoCopy() Returns the Note Callers must not modify the resulting SymbolTable array! This will violate the immutability property of this class.
| |
| getMaxId | back to summary |
|---|---|
| pack-priv int getMaxId() | |
| getSystemSymbolTable | back to summary |
|---|---|
| pack-priv SymbolTable getSystemSymbolTable() Gets the sole system symtab. | |
| prepBaseSids | back to summary |
|---|---|
| private static int prepBaseSids(int[] baseSids, SymbolTable[] imports) Collects the necessary maxId info. from the passed-in
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |