Example usage for javax.annotation.processing ProcessingEnvironment getElementUtils

List of usage examples for javax.annotation.processing ProcessingEnvironment getElementUtils

Introduction

In this page you can find the example usage for javax.annotation.processing ProcessingEnvironment getElementUtils.

Prototype

Elements getElementUtils();

Source Link

Document

Returns an implementation of some utility methods for operating on elements

Usage

From source file:org.boundbox.processor.BoundBoxProcessor.java

@Override
public void init(ProcessingEnvironment env) {
    filer = env.getFiler();
    messager = env.getMessager();
    elements = env.getElementUtils();
}

From source file:easymvp.compiler.EasyMVPProcessor.java

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    elementUtils = processingEnv.getElementUtils();
    filer = processingEnv.getFiler();/* w  w  w  .j  a va2s  .c o  m*/
    messager = processingEnv.getMessager();
    typeUtils = processingEnv.getTypeUtils();
}

From source file:com.github.pellaton.springconfigvalidation.SpringConfigurationValidationProcessor.java

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);

    this.messager = processingEnv.getMessager();
    this.typeUtils = processingEnv.getTypeUtils();
    this.elementUtils = processingEnv.getElementUtils();

    this.autowiredTypeElement = this.elementUtils
            .getTypeElement("org.springframework.beans.factory.annotation.Autowired");
    this.beanTypeElement = this.elementUtils.getTypeElement("org.springframework.context.annotation.Bean");
    this.bfppTypeElement = this.elementUtils
            .getTypeElement("org.springframework.beans.factory.config.BeanFactoryPostProcessor");
    this.configurationTypeElement = this.elementUtils
            .getTypeElement("org.springframework.context.annotation.Configuration");
}

From source file:com.contentful.vault.compiler.Processor.java

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    elementUtils = processingEnv.getElementUtils();
    typeUtils = processingEnv.getTypeUtils();
    filer = processingEnv.getFiler();/*ww w . j a  v a  2s .  com*/
}

From source file:com.rgeldmacher.leash.LeashAnnotationProcessor.java

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    filer = processingEnv.getFiler();/* w w  w. j a  v a  2  s  . c o m*/
    types = processingEnv.getTypeUtils();
    elements = processingEnv.getElementUtils();
}

From source file:org.jannocessor.processor.JannocessorProcessorBase.java

@Override
public synchronized void init(ProcessingEnvironment env) {
    // overwrite the class loader set by the Maven plugin
    Thread.currentThread().setContextClassLoader(JannocessorEngine.class.getClassLoader());

    super.init(env);

    try {/*from   w ww.  j  a  va2  s.c  o  m*/
        messager = env.getMessager();
        JannocessorLogger.messager = messager;

        elementUtils = env.getElementUtils();
        typeUtils = env.getTypeUtils();
        filer = env.getFiler();
        options = new Config(env.getOptions());
        injector = createInjector();

        processOptions();

        logger.info("Initializing services...");

        engine = injector.getInstance(JannocessorEngine.class);
        engine.configure(engine.getTemplatesPath(), true);

        // recompileProcessors();

        Class<?> hotConfig = Jannocessor.reloadClass("org.jannocessor.config.Processors",
                Power.emptyList(String.class));
        processorsConfig = new ProcessorsConfiguration(hotConfig);

        showConfiguration();

        logger.info("Initialization finished.");
    } catch (Exception e) {
        logger.error("Initialization failed!");
        valid = false;
        throw new RuntimeException(e);
    }
}

From source file:co.touchlab.squeaky.processor.AnnotationProcessor.java

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    typeUtils = processingEnv.getTypeUtils();
    elementUtils = processingEnv.getElementUtils();
    filer = processingEnv.getFiler();/*from w ww  .  ja v a 2  s .co  m*/
    messager = processingEnv.getMessager();
}