196 CHAPTER 10 PLUGGABLE ANNOTATION PROCESSING UPDATES
196 CHAPTER 10 PLUGGABLE ANNOTATION PROCESSING UPDATES Listing 10-6 puts all the pieces together to define an annotation processor that prints out the specified classes and interfaces, along with the names of their methods (though not the constructors, which requires another visitXXXDeclaration() method implemented). Listing 10-6. J2SE 5.0 Annotation Processor import com.sun.mirror.apt.*; import com.sun.mirror.declaration.*; import com.sun.mirror.type.*; import com.sun.mirror.util.*; import static com.sun.mirror.util.DeclarationVisitors.*; import java.util.*; public class DumpFactory implements AnnotationProcessorFactory { // Process all annotations private static final Collection
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Tomcat Web Hosting services