1 /******************************************************************************* 2 * Copyright (c) 2005 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 * tyeung@bea.com - initial API 10 *******************************************************************************/ 11 package org.eclipse.jdt.apt.core.env; 12 13 import java.util.Set; 14 15 import com.sun.mirror.apt.AnnotationProcessor; 16 import com.sun.mirror.apt.AnnotationProcessorFactory; 17 import com.sun.mirror.declaration.AnnotationTypeDeclaration; 18 19 /** 20 * Extend the APT annotation processor factory API to provide extra features. 21 * Implementation of this annotation processor is treated just like 22 * the regular annotation processor during build and reconcile. 23 * @author tyeung 24 * 25 */ 26 public interface EclipseAnnotationProcessorFactory extends 27 AnnotationProcessorFactory 28 { 29 /** 30 * Returns an annotation processor for a set of annotation types. 31 * Implementation of this API is guaranteed to be invoked with an 32 * extended annotation processor environment for both 33 * {@link #getProcessorFor} version of the method. 34 * 35 * @param atds the set of annotation types 36 * @param env the environment for processing. 37 * @return an annotation processor or null if the processor cannot be created. 38 */ 39 AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds, 40 EclipseAnnotationProcessorEnvironment env); 41 } 42