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 ControlSecondaryAnnotationProcessorFactory implements AnnotationProcessorFactory 33 { 34 private static final Collection <String > _supportedAnnotations = 35 Collections.unmodifiableCollection( 36 Arrays.asList(new String [] { 37 java.lang.annotation.Target .class.getName(), 38 java.lang.annotation.Retention .class.getName(), 39 org.apache.beehive.controls.api.bean.ExternalPropertySets.class.getName(), 40 org.apache.beehive.controls.api.bean.ControlReferences.class.getName(), 41 org.apache.beehive.controls.api.bean.Threading.class.getName(), 42 org.apache.beehive.controls.api.context.Context.class.getName(), 43 org.apache.beehive.controls.api.events.Client.class.getName(), 44 org.apache.beehive.controls.api.events.EventHandler.class.getName(), 45 org.apache.beehive.controls.api.events.EventSet.class.getName(), 46 org.apache.beehive.controls.api.packaging.BeanInfo.class.getName(), 47 org.apache.beehive.controls.api.packaging.EventSetInfo.class.getName(), 48 org.apache.beehive.controls.api.packaging.FeatureAttribute.class.getName(), 49 org.apache.beehive.controls.api.packaging.FeatureInfo.class.getName(), 50 org.apache.beehive.controls.api.packaging.ManifestAttribute.class.getName(), 51 org.apache.beehive.controls.api.packaging.ManifestAttributes.class.getName(), 52 org.apache.beehive.controls.api.packaging.PropertyInfo.class.getName(), 53 org.apache.beehive.controls.api.packaging.PropertyInfo.class.getName(), 54 org.apache.beehive.controls.api.packaging.PropertyInfo.class.getName(), 55 org.apache.beehive.controls.api.packaging.PropertyInfo.class.getName(), 56 org.apache.beehive.controls.api.properties.BaseProperties.class.getName(), 57 org.apache.beehive.controls.api.versioning.Version.class.getName(), 58 org.apache.beehive.controls.api.versioning.VersionRequired.class.getName(), 59 org.apache.beehive.controls.api.versioning.VersionSupported.class.getName() 60 })); 61 62 private static final Collection <String > _supportedOptions = 63 Collections.unmodifiableCollection( 64 Arrays.asList(new String [] { 65 "-AcontrolGenerator", })); 67 68 public Collection <String > supportedOptions() 69 { 70 return _supportedOptions; 71 } 72 73 public Collection <String > supportedAnnotationTypes() 74 { 75 return _supportedAnnotations; 76 } 77 78 public AnnotationProcessor getProcessorFor(Set <AnnotationTypeDeclaration> atds, 79 AnnotationProcessorEnvironment env) 80 { 81 return new ControlSecondaryAnnotationProcessor(atds, env); 82 } 83 } 84 | Popular Tags |