01: package jaxx.compiler;
02:
03: import java.util.*;
04:
05: /** Symbol table constructed during the first pass of compilation. */
06: public class SymbolTable {
07: private String super class;
08:
09: // maps ID strings to class names -- we can't map directly to CompiledObjects, because we
10: // can't create those until after the first pass
11: private Map/*<String, String>*/ids = new HashMap/*<String, String>*/();
12:
13: private List/*<FieldDescriptor>*/scriptFields = new ArrayList/*<FieldDescriptor>*/();
14:
15: private List/*<MethodDescriptor>*/scriptMethods = new ArrayList/*<MethodDescriptor>*/();
16:
17: /** Returns the fully-qualified name of the superclass of the class described by this symbol table. */
18: public String getSuperclassName() {
19: return super class;
20: }
21:
22: public void setSuperclassName(String super class) {
23: this .super class = super class;
24: }
25:
26: /** Returns a map of IDs to class names. Each entry in the map corresponds to a class tag with an
27: * <code>id</code> attribute. The <code>id</code> is the key, and the fully-qualified class name
28: * of the tag is the value.
29: */
30: public Map/*<String, String>*/getClassTagIds() {
31: return ids;
32: }
33:
34: /** Returns a list of <code>FieldDescriptors</code> for fields defined in <script> tags.
35: */
36: public List/*<FieldDescriptor*/getScriptFields() {
37: return scriptFields;
38: }
39:
40: /** Returns a list of <code>MethodDescriptors</code> for methods defined in <script> tags.
41: */
42: public List/*<MethodDescriptor*/getScriptMethods() {
43: return scriptMethods;
44: }
45: }
|