KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > compiler > apt > dispatch > IProcessorProvider


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 BEA Systems, Inc.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * wharley@bea.com - initial API and implementation
10  *
11  *******************************************************************************/

12
13 package org.eclipse.jdt.internal.compiler.apt.dispatch;
14
15 import java.util.List JavaDoc;
16
17 import javax.annotation.processing.Processor;
18
19 /**
20  * Implementors know how to discover annotation processors, and maintain a list of processors that
21  * have been discovered and initialized so far.
22  */

23 public interface IProcessorProvider {
24
25     /**
26      * Return the next processor that can be discovered, according to the order and discovery rules
27      * of the provider (see, for instance, {@link Processor}.
28      * @return a ProcessorInfo wrapping an initialized Processor, or <code>null</code> if there are
29      * no more processors to be discovered.
30      */

31     ProcessorInfo discoverNextProcessor();
32
33     /**
34      * @return the list of all processors that have been discovered so far. This list will grow when
35      * {@link #discoverNextProcessor()} is called.
36      */

37     List JavaDoc<ProcessorInfo> getDiscoveredProcessors();
38     
39     /**
40      * Called when a processor throws an exception. This may abort compilation, throw an
41      * unchecked exception, etc; the caller should not assume that this method will return.
42      *
43      * @param p the processor, if known, or null if not.
44      * @param e
45      */

46     void reportProcessorException(Processor p, Exception JavaDoc e);
47 }
48
Popular Tags