< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java

Print this page
*** 44,10 ***
--- 44,11 ---
  import javax.tools.JavaFileObject;
  import static javax.lang.model.util.ElementFilter.methodsIn;
  
  import com.sun.source.util.JavacTask;
  import com.sun.tools.javac.api.JavacTaskImpl;
+ import com.sun.tools.javac.api.JavacTrees;
  import com.sun.tools.javac.code.*;
  import com.sun.tools.javac.code.Attribute.Compound;
  import com.sun.tools.javac.code.Directive.ExportsDirective;
  import com.sun.tools.javac.code.Directive.ExportsFlag;
  import com.sun.tools.javac.code.Directive.OpensDirective;

*** 55,30 ***
  import com.sun.tools.javac.code.Directive.RequiresDirective;
  import com.sun.tools.javac.code.Directive.RequiresFlag;
  import com.sun.tools.javac.code.Scope.WriteableScope;
  import com.sun.tools.javac.code.Source.Feature;
  import com.sun.tools.javac.code.Symbol.*;
  import com.sun.tools.javac.comp.AttrContext;
  import com.sun.tools.javac.comp.Enter;
  import com.sun.tools.javac.comp.Env;
  import com.sun.tools.javac.main.JavaCompiler;
  import com.sun.tools.javac.processing.PrintingProcessor;
  import com.sun.tools.javac.tree.DocCommentTable;
  import com.sun.tools.javac.tree.JCTree;
  import com.sun.tools.javac.tree.JCTree.*;
  import com.sun.tools.javac.tree.TreeInfo;
  import com.sun.tools.javac.tree.TreeScanner;
  import com.sun.tools.javac.util.*;
  import com.sun.tools.javac.util.DefinedBy.Api;
  import com.sun.tools.javac.util.Name;
  import static com.sun.tools.javac.code.Kinds.Kind.*;
  import static com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE;
  import static com.sun.tools.javac.code.TypeTag.CLASS;
! import com.sun.tools.javac.comp.Attr;
  import com.sun.tools.javac.comp.Modules;
- import com.sun.tools.javac.comp.Resolve;
  import com.sun.tools.javac.resources.CompilerProperties.Notes;
  import static com.sun.tools.javac.tree.JCTree.Tag.*;
  
  /**
   * Utility methods for operating on program elements.
   *
--- 56,32 ---
  import com.sun.tools.javac.code.Directive.RequiresDirective;
  import com.sun.tools.javac.code.Directive.RequiresFlag;
  import com.sun.tools.javac.code.Scope.WriteableScope;
  import com.sun.tools.javac.code.Source.Feature;
  import com.sun.tools.javac.code.Symbol.*;
+ import com.sun.tools.javac.comp.Attr;
  import com.sun.tools.javac.comp.AttrContext;
  import com.sun.tools.javac.comp.Enter;
  import com.sun.tools.javac.comp.Env;
  import com.sun.tools.javac.main.JavaCompiler;
  import com.sun.tools.javac.processing.PrintingProcessor;
  import com.sun.tools.javac.tree.DocCommentTable;
  import com.sun.tools.javac.tree.JCTree;
  import com.sun.tools.javac.tree.JCTree.*;
  import com.sun.tools.javac.tree.TreeInfo;
+ import com.sun.tools.javac.tree.TreeMaker;
  import com.sun.tools.javac.tree.TreeScanner;
  import com.sun.tools.javac.util.*;
  import com.sun.tools.javac.util.DefinedBy.Api;
  import com.sun.tools.javac.util.Name;
  import static com.sun.tools.javac.code.Kinds.Kind.*;
  import static com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE;
  import static com.sun.tools.javac.code.TypeTag.CLASS;
! 
  import com.sun.tools.javac.comp.Modules;
  import com.sun.tools.javac.resources.CompilerProperties.Notes;
+ 
  import static com.sun.tools.javac.tree.JCTree.Tag.*;
  
  /**
   * Utility methods for operating on program elements.
   *

*** 93,14 ***
      private final Symtab syms;
      private final Modules modules;
      private final Names names;
      private final Types types;
      private final Enter enter;
      private final Attr attr;
-     private final Resolve resolve;
      private final JavacTaskImpl javacTaskImpl;
      private final Log log;
      private final boolean allowModules;
  
      public static JavacElements instance(Context context) {
          JavacElements instance = context.get(JavacElements.class);
          if (instance == null)
--- 96,15 ---
      private final Symtab syms;
      private final Modules modules;
      private final Names names;
      private final Types types;
      private final Enter enter;
+     private final JavacTrees javacTrees;
      private final Attr attr;
      private final JavacTaskImpl javacTaskImpl;
      private final Log log;
+     private final TreeMaker make;
      private final boolean allowModules;
  
      public static JavacElements instance(Context context) {
          JavacElements instance = context.get(JavacElements.class);
          if (instance == null)

*** 116,14 ***
          modules = Modules.instance(context);
          names = Names.instance(context);
          types = Types.instance(context);
          enter = Enter.instance(context);
          attr = Attr.instance(context);
!         resolve = Resolve.instance(context);
          JavacTask t = context.get(JavacTask.class);
          javacTaskImpl = t instanceof JavacTaskImpl taskImpl ? taskImpl : null;
          log = Log.instance(context);
          Source source = Source.instance(context);
          allowModules = Feature.MODULES.allowedInSource(source);
      }
  
      @Override @DefinedBy(Api.LANGUAGE_MODEL)
--- 120,15 ---
          modules = Modules.instance(context);
          names = Names.instance(context);
          types = Types.instance(context);
          enter = Enter.instance(context);
          attr = Attr.instance(context);
!         javacTrees = JavacTrees.instance(context);
          JavacTask t = context.get(JavacTask.class);
          javacTaskImpl = t instanceof JavacTaskImpl taskImpl ? taskImpl : null;
          log = Log.instance(context);
+         make = TreeMaker.instance(context);
          Source source = Source.instance(context);
          allowModules = Feature.MODULES.allowedInSource(source);
      }
  
      @Override @DefinedBy(Api.LANGUAGE_MODEL)
< prev index next >