Last active
August 29, 2015 14:04
-
-
Save davidtimmerman/106f7244e3fa0bbed517 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SupportedAnnotationTypes("me.guice.annotations.PropertySource") | |
@SupportedSourceVersion(SourceVersion.RELEASE_8) | |
public class PropertySourceProcessor extends AbstractProcessor { | |
public PropertySourceProcessor() { | |
super(); | |
} | |
@Override | |
public boolean process(Set<? extends TypeElement> annotations, | |
RoundEnvironment roundEnv) { | |
for (Element elem : roundEnv.getElementsAnnotatedWith(PropertySource.class)) { | |
PropertySource prop = elem.getAnnotation(PropertySource.class); | |
String message = "wants a " + elem.getSimpleName() | |
+ " from file " + prop.file(); | |
processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, message); | |
} | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment