use of com.oracle.truffle.api.dsl.GeneratedBy in project graal by oracle.
the class InstrumentableProcessor method addGeneratedBy.
private static void addGeneratedBy(ProcessorContext context, CodeTypeElement generatedType, TypeElement generatedByType) {
DeclaredType generatedBy = (DeclaredType) context.getType(GeneratedBy.class);
// only do this if generatedBy is on the classpath.
if (generatedBy != null) {
CodeAnnotationMirror generatedByAnnotation = new CodeAnnotationMirror(generatedBy);
generatedByAnnotation.setElementValue(generatedByAnnotation.findExecutableElement("value"), new CodeAnnotationValue(generatedByType.asType()));
generatedType.addAnnotationMirror(generatedByAnnotation);
}
}
Aggregations