1. /*
  2. * @(#)AnnotationProcessor.java 1.2 04/02/10
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.mirror.apt;
  8. import java.io.IOException;
  9. import java.util.Collection;
  10. /**
  11. * An annotation processor, used to examine and process the
  12. * annotations of program elements. An annotation processor may,
  13. * for example, create new source files and XML documents to be used
  14. * in conjunction with the original code.
  15. *
  16. * <p> An annotation processor is constructed by a
  17. * {@linkplain AnnotationProcessorFactory factory}, which provides it with an
  18. * {@linkplain AnnotationProcessorEnvironment environment} that
  19. * encapsulates the state it needs.
  20. * Messages regarding warnings and errors encountered during processing
  21. * should be directed to the environment's {@link Messager},
  22. * and new files may be created using the environment's {@link Filer}.
  23. *
  24. * <p> Each annotation processor is created to process annotations
  25. * of a particular annotation type or set of annotation types.
  26. * It may use its environment to find the program elements with
  27. * annotations of those types. It may freely examine any other program
  28. * elements in the course of its processing.
  29. *
  30. * @author Joseph D. Darcy
  31. * @author Scott Seligman
  32. * @version 1.2 04/02/10
  33. * @since 1.5
  34. */
  35. public interface AnnotationProcessor {
  36. /**
  37. * Process all program elements supported by this annotation processor.
  38. */
  39. void process();
  40. }