com.mysema.query.hql.apt.JPAAnnotationProcessor Maven / Gradle / Ivy
package com.mysema.query.hql.apt;
import java.lang.annotation.Annotation;
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.TypeElement;
import javax.persistence.Embeddable;
import javax.persistence.Entity;
import javax.persistence.MappedSuperclass;
import javax.tools.Diagnostic;
import com.mysema.query.annotations.DTO;
import com.mysema.query.apt.Processor;
/**
* @author tiwe
*
*/
@SupportedAnnotationTypes("*")
@SupportedSourceVersion(SourceVersion.RELEASE_6)
public class JPAAnnotationProcessor extends AbstractProcessor{
@Override
public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Running " + getClass().getSimpleName());
Class extends Annotation> entity = Entity.class;
Class extends Annotation> superType = MappedSuperclass.class;
Class extends Annotation> embeddable = Embeddable.class;
Class extends Annotation> dtoAnnotation = DTO.class;
Processor p = new Processor(processingEnv, entity, superType, embeddable, dtoAnnotation, "Q");
p.process(roundEnv);
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy