private static Context preRegister(Context context) { Bark.preRegister(context); if (context.get(JavaFileManager.class) == null) JavacFileManager.preRegister(context); return context; }
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); }
/** Get the JavaCompiler instance for this context. */ public static AptJavaCompiler instance(Context context) { AptJavaCompiler instance = context.get(compilerKey); if (instance == null) instance = new AptJavaCompiler(context); return instance; }
public static Enter instance(Context context) { Enter instance = context.get(enterKey); if (instance == null) instance = new Enter(context); return instance; }
public static Annotate instance(Context context) { Annotate instance = context.get(annotateKey); if (instance == null) instance = new Annotate(context); return instance; }
public static JavacTypes instance(Context context) { JavacTypes instance = context.get(JavacTypes.class); if (instance == null) instance = new JavacTypes(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; }