< prev index next >

src/jdk.jextract/share/classes/com/sun/tools/jextract/TypeDictionary.java

Print this page

        

@@ -42,17 +42,17 @@
  * A dictionary that find Java type for a given native type.
  * Each instance of TypeDictionary presents types for a given java package.
  */
 final class TypeDictionary {
     private final Logger logger = Logger.getLogger(getClass().getPackage().getName());
-    private Context ctx;
+    private HeaderResolver resolver;
     private final HeaderFile headerFile;
     private final Map<String, JType> functionalTypes;
     private int serialNo;
 
-    TypeDictionary(Context ctx, HeaderFile headerFile) {
-        this.ctx = ctx;
+    TypeDictionary(HeaderResolver resolver, HeaderFile headerFile) {
+        this.resolver = resolver;
         this.headerFile = headerFile;
         functionalTypes = new HashMap<>();
     }
     
     private int serialNo() {

@@ -61,11 +61,11 @@
 
     private String recordOwnerClass(Type t) {
         try {
             //try resolve globally
             Path p = t.getDeclarationCursor().getSourceLocation().getFileLocation().path();
-            HeaderFile hf = ctx.headerFor(p);
+            HeaderFile hf = resolver.headerFor(p);
             return Utils.toInternalName(hf.pkgName, hf.clsName);
         } catch (Throwable ex) {
             //fallback: resolve locally. This can happen for two reasons: (i) the symbol to be resolved is a builtin
             //symbol (e.g. no header file has its definition), or (ii) when the declaration cursor points to an header file
             //not previously seen by Context.
< prev index next >