1 package polyglot.types; 2 3 import java.util.List ; 4 5 import polyglot.util.Copy; 6 7 16 public interface Context extends Resolver, Copy 17 { 18 19 TypeSystem typeSystem(); 20 21 22 void addVariable(VarInstance vi); 23 24 25 void addMethod(MethodInstance mi); 26 27 28 void addNamed(Named t); 29 30 34 MethodInstance findMethod(String name, List formalTypes) throws SemanticException; 35 36 37 VarInstance findVariable(String name) throws SemanticException; 38 39 40 VarInstance findVariableSilent(String name); 41 42 43 LocalInstance findLocal(String name) throws SemanticException; 44 45 46 FieldInstance findField(String name) throws SemanticException; 47 48 52 ClassType findFieldScope(String name) throws SemanticException; 53 54 58 ClassType findMethodScope(String name) throws SemanticException; 59 60 61 ImportTable importTable(); 62 63 66 Resolver outerResolver(); 67 68 69 Context pushSource(ImportTable it); 70 71 72 Context pushClass(ParsedClassType scope, ClassType type); 73 74 75 Context pushCode(CodeInstance f); 76 77 78 Context pushBlock(); 79 80 84 Context pushStatic(); 85 86 87 Context pop(); 88 89 90 boolean inCode(); 91 92 93 boolean isLocal(String name); 94 95 104 boolean inStaticContext(); 105 106 107 ClassType currentClass(); 108 109 110 ParsedClassType currentClassScope(); 111 112 113 CodeInstance currentCode(); 114 115 116 Package package_(); 117 } 118 | Popular Tags |