|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.parser.ModuleMap
public class ModuleMap
A mapping between module names. This class has been designed for
the efficient renaming of both module
dependencies and nonterminals.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,ModuleName> |
map
The mapping from module names (represented as strings) to module names (represented as module names). |
| Constructor Summary | |
|---|---|
ModuleMap()
Create a new module map. |
|
ModuleMap(ModuleList keys,
ModuleList values)
Create a new module map. |
|
ModuleMap(ModuleName key,
ModuleName value)
Create a new module map. |
|
| Method Summary | |
|---|---|
boolean |
containsKey(ModuleName key)
Determine whether this module map contains a mapping for the specified module name. |
boolean |
containsKey(java.lang.String key)
Determine whether this module map contains a mapping for the specified module name. |
ModuleName |
get(ModuleName key)
Look up the specified module name. |
java.lang.String |
get(java.lang.String key)
Look up the specified module name. |
NonTerminal |
map(NonTerminal nt,
Analyzer analyzer)
Map the specified nonterminal to its replacement, which may be the same as the original. |
void |
put(ModuleName key,
ModuleName value)
Add the specified mapping. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<java.lang.String,ModuleName> map
module names).
| Constructor Detail |
|---|
public ModuleMap()
public ModuleMap(ModuleName key,
ModuleName value)
key - The single initial key.value - The single initial value.
public ModuleMap(ModuleList keys,
ModuleList values)
keys - The list of keys.values - The list of values.
java.lang.IllegalArgumentException - Signals that the lists have different lengths.| Method Detail |
|---|
public void put(ModuleName key,
ModuleName value)
key - The key.value - The value.public boolean containsKey(ModuleName key)
key - The module name.
true if this module map has a value for the
key.public boolean containsKey(java.lang.String key)
key - The module name.
true if this module map has a value for the
key.public ModuleName get(ModuleName key)
key - The module name.
null if there is
no mapping for the module name.public java.lang.String get(java.lang.String key)
key - The module name.
null if there is
no mapping for the module name.
public NonTerminal map(NonTerminal nt,
Analyzer analyzer)
Renamer.Translation
map in interface Renamer.Translationnt - The nonterminal.analyzer - The analyzer utility.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||