All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mysema.query.hql.apt.JPAAnnotationProcessor Maven / Gradle / Ivy

There is a newer version: 0.4.7
Show newest version
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 annotations, RoundEnvironment roundEnv) {
        processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Running " + getClass().getSimpleName());
        Class entity = Entity.class;
        Class superType = MappedSuperclass.class;
        Class embeddable = Embeddable.class;
        Class 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