OnJava8-Examples/annotations/InterfaceExtractorProcessorFactory.java
Bruce Eckel 7265b6aceb Updated to match book
Partway through update
2015-04-29 12:53:35 -07:00

23 lines
743 B
Java

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