package com.sun.persistence.tools.apt; import com.sun.mirror.apt.AnnotationProcessor; import com.sun.mirror.apt.AnnotationProcessorEnvironment; import com.sun.mirror.apt.AnnotationProcessorFactory; import com.sun.mirror.declaration.AnnotationTypeDeclaration; import javax.persistence.Embeddable; import javax.persistence.EmbeddableSuperclass; import javax.persistence.Entity; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Set; /** * This is the factory for {@link ListPersistenceClassAp}. * * @author Sanjeeb.Sahoo@Sun.COM */ public class ListPersistenceClassApf implements AnnotationProcessorFactory { private Collection supportedTypes = Collections.unmodifiableCollection(Arrays.asList( Entity.class.getName(), Embeddable.class.getName(), EmbeddableSuperclass.class.getName())); private Collection supportedOptions = Collections.unmodifiableCollection(Arrays.asList("-Add", "-Apu")); public Collection supportedOptions() { return supportedOptions; } public Collection supportedAnnotationTypes() { return supportedTypes; } public AnnotationProcessor getProcessorFor( Set atds, final AnnotationProcessorEnvironment env) { return new ListPersistenceClassAp(env); } }