예제 #1
0
  protected Enter(Context context) {
    context.put(enterKey, this);

    log = Log.instance(context);
    reader = ClassReader.instance(context);
    make = TreeMaker.instance(context);
    syms = Symtab.instance(context);
    chk = Check.instance(context);
    memberEnter = MemberEnter.instance(context);
    types = Types.instance(context);
    annotate = Annotate.instance(context);
    lint = Lint.instance(context);

    predefClassDef =
        make.ClassDef(make.Modifiers(PUBLIC), syms.predefClass.name, null, null, null, null);
    predefClassDef.sym = syms.predefClass;
    todo = Todo.instance(context);
    fileManager = context.get(JavaFileManager.class);
  }
예제 #2
0
 public static Enter instance(Context context) {
   Enter instance = context.get(enterKey);
   if (instance == null) instance = new Enter(context);
   return instance;
 }
 /** Get the DiagnosticFormatter instance for this context. */
 public static RichDiagnosticFormatter instance(Context context) {
   RichDiagnosticFormatter instance = context.get(RichDiagnosticFormatter.class);
   if (instance == null) instance = new RichDiagnosticFormatter(context);
   return instance;
 }