OnJava8-Examples/annotations/InterfaceExtractorProcessorFactory.java

24 lines
744 B
Java
Raw Normal View History

2015-04-20 15:36:01 -07:00
//: annotations/InterfaceExtractorProcessorFactory.java
// APT-based annotation processing.
// {CompileTimeError} Not working in Java 8
2015-04-20 15:36:01 -07:00
package annotations;
import com.sun.mirror.apt.*;
import com.sun.mirror.declaration.*;
2015-04-20 15:36:01 -07:00
import java.util.*;
public class InterfaceExtractorProcessorFactory
implements AnnotationProcessorFactory {
public AnnotationProcessor getProcessorFor(
Set<AnnotationTypeDeclaration> atds,
AnnotationProcessorEnvironment env) {
2015-04-20 15:36:01 -07:00
return new InterfaceExtractorProcessor(env);
}
public Collection<String> supportedAnnotationTypes() {
2015-04-20 15:36:01 -07:00
return
Collections.singleton("annotations.ExtractInterface");
}
public Collection<String> supportedOptions() {
2015-04-20 15:36:01 -07:00
return Collections.emptySet();
}
2015-05-05 11:20:13 -07:00
} ///:~