use of blue.plugin.InstrumentEditorPlugin in project blue by kunstmusik.
the class InstrumentEditorPluginProcessor method handleProcess.
@Override
protected boolean handleProcess(Set<? extends TypeElement> set, RoundEnvironment env) throws LayerGenerationException {
Elements elements = processingEnv.getElementUtils();
for (Element e : env.getElementsAnnotatedWith(InstrumentEditorPlugin.class)) {
TypeElement clazz = (TypeElement) e;
InstrumentEditorPlugin instrumentEditorPlugin = clazz.getAnnotation(InstrumentEditorPlugin.class);
String teName = elements.getBinaryName(clazz).toString();
File f = layer(e).file("blue/instrumentEditors/" + teName.replace('.', '-') + ".instance");
TypeMirror tm = null;
try {
instrumentEditorPlugin.instrumentType();
} catch (MirroredTypeException mte) {
tm = mte.getTypeMirror();
}
f.stringvalue("instrumentType", tm.toString());
f.write();
}
return true;
}
Aggregations