1 package org.apache.beehive.controls.runtime.generator.apt; 2 3 20 21 import java.util.Arrays ; 22 import java.util.ArrayList ; 23 import java.util.Collection ; 24 import java.util.Collections ; 25 import java.util.Set ; 26 27 import com.sun.mirror.apt.AnnotationProcessor; 28 import com.sun.mirror.apt.AnnotationProcessorFactory; 29 import com.sun.mirror.apt.AnnotationProcessorEnvironment; 30 import com.sun.mirror.declaration.AnnotationTypeDeclaration; 31 32 public class ControlAnnotationProcessorFactory implements AnnotationProcessorFactory 33 { 34 private static final Collection <String > _supportedAnnotations = 35 Collections.unmodifiableCollection( 36 Arrays.asList(new String [] { 37 org.apache.beehive.controls.api.bean.ControlInterface.class.getName(), 38 org.apache.beehive.controls.api.bean.ControlExtension.class.getName(), 39 org.apache.beehive.controls.api.bean.ControlImplementation.class.getName(), 40 org.apache.beehive.controls.api.properties.PropertySet.class.getName() 41 })); 42 43 private static final Collection <String > _supportedOptions = 44 Collections.unmodifiableCollection( 45 Arrays.asList(new String [] { 46 "-AcontrolGenerator", })); 48 49 public Collection <String > supportedOptions() 50 { 51 return _supportedOptions; 52 } 53 54 public Collection <String > supportedAnnotationTypes() 55 { 56 return _supportedAnnotations; 57 } 58 59 public AnnotationProcessor getProcessorFor(Set <AnnotationTypeDeclaration> atds, 60 AnnotationProcessorEnvironment env) 61 { 62 return new ControlAnnotationProcessor(atds, env); 63 } 64 } 65 | Popular Tags |