private static void processElement(AnnotationProcessor<?> generator, Element e, boolean callback) { try { generator.process(e, callback); } catch (Throwable e1) { handleThrowable(generator, e1, e); } }
ProcessorContext(ProcessingEnvironment env, ProcessCallback callback) { this.environment = env; this.callback = callback; this.log = new Log(environment); this.truffleTypes = new TruffleTypes(this); }
@Override protected void writeHeader() { if (env == null) { return; } writeLn("// CheckStyle: start generated"); }
private TypeMirror inheritType(AnnotationMirror annotation, String valueName, TypeMirror parentType) { TypeMirror inhertNodeType = context.getTruffleTypes().getNode(); TypeMirror value = ElementUtils.getAnnotationValue(TypeMirror.class, annotation, valueName); if (ElementUtils.typeEquals(inhertNodeType, value)) { return parentType; } else { return value; } }
public AbstractParser() { this.context = ProcessorContext.getInstance(); this.processingEnv = context.getEnvironment(); this.log = context.getLog(); }
void assertNoErrorExpected(Element e) { ExpectError.assertNoErrorExpected(processingEnv, e); }
private TypeMirror getType(Class<?> clazz) { return context.getType(clazz); }
private CodeTypeElement generateWrapperOnly(ProcessorContext context, Element e) { CodeTypeElement wrapper = generateWrapper(context, e, true); if (wrapper == null) { return null; } assertNoErrorExpected(e); return wrapper; }
public void debug(String message, Object... args) { message(Kind.ERROR, null, null, null, message, args); }
private TypeMirror inheritType(AnnotationMirror annotation, String valueName, TypeMirror parentType) { TypeMirror inhertNodeType = context.getTruffleTypes().getNode(); TypeMirror value = ElementUtils.getAnnotationValue(TypeMirror.class, annotation, valueName); if (ElementUtils.typeEquals(inhertNodeType, value)) { return parentType; } else { return value; } }
public AbstractParser() { this.context = ProcessorContext.getInstance(); this.processingEnv = context.getEnvironment(); this.log = context.getLog(); }
private static void processElement(AnnotationProcessor<?> generator, Element e, boolean callback) { try { generator.process(e, callback); } catch (Throwable e1) { handleThrowable(generator, e1, e); } }
ProcessorContext(ProcessingEnvironment env, ProcessCallback callback) { this.environment = env; this.callback = callback; this.log = new Log(environment); this.truffleTypes = new TruffleTypes(this); }
void assertNoErrorExpected(Element e) { ExpectError.assertNoErrorExpected(processingEnv, e); }
private TypeMirror getType(Class<?> clazz) { return context.getType(clazz); }
void assertNoErrorExpected(Element element) { ExpectError.assertNoErrorExpected(processingEnv, element); }
void assertNoErrorExpected(Element e) { ExpectError.assertNoErrorExpected(processingEnv, e); }
void assertNoErrorExpected(final Element originatingElm) { ExpectError.assertNoErrorExpected(processingEnv, originatingElm); }