/** * Use a new context. May be called from outside to update internal state for a new * annotation-processing round. */ public void setContext(Context context) { context.put(JavacTypes.class, this); syms = Symtab.instance(context); types = Types.instance(context); }
public static JavacTypes instance(Context context) { JavacTypes instance = context.get(JavacTypes.class); if (instance == null) instance = new JavacTypes(context); return instance; }