Example usage for javax.annotation.processing ProcessingEnvironment getFiler

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

Introduction

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

Prototype

Filer getFiler();

Source Link

Document

Returns the filer used to create new source, class, or auxiliary files.

Usage

From source file:android.databinding.tool.util.GenerationalClassUtil.java

public static void writeIntermediateFile(ProcessingEnvironment processingEnv, String packageName,
        String fileName, Serializable object) {
    ObjectOutputStream oos = null;
    try {/* ww w .  java 2 s  . c  om*/
        FileObject intermediate = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT,
                packageName, fileName);
        OutputStream ios = intermediate.openOutputStream();
        oos = new ObjectOutputStream(ios);
        oos.writeObject(object);
        oos.close();
        L.d("wrote intermediate bindable file %s %s", packageName, fileName);
    } catch (IOException e) {
        L.e(e, "Could not write to intermediate file: %s", fileName);
    } finally {
        IOUtils.closeQuietly(oos);
    }
}

From source file:com.github.cchacin.JsonSchemaProcessor.java

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    filer = processingEnv.getFiler();
}

From source file:me.oriley.shiv.ShivProcessor.java

@Override
public synchronized void init(ProcessingEnvironment env) {
    super.init(env);
    mFiler = env.getFiler();
    setTag(ShivProcessor.class.getSimpleName());
}

From source file:org.squashtest.tm.tools.annotation.processor.DynamicComponentProcessor.java

@Override
public final synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    filer = processingEnv.getFiler();
    messager = processingEnv.getMessager();

}

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:com.rgeldmacher.leash.LeashAnnotationProcessor.java

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    filer = processingEnv.getFiler();
    types = processingEnv.getTypeUtils();
    elements = processingEnv.getElementUtils();
}

From source file:easymvp.compiler.EasyMVPProcessor.java

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    elementUtils = processingEnv.getElementUtils();
    filer = processingEnv.getFiler();
    messager = processingEnv.getMessager();
    typeUtils = processingEnv.getTypeUtils();
}

From source file:info.archinnov.achilles.internals.apt.processors.meta.AchillesProcessor.java

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

    aptUtils = new AptUtils(processingEnv.getElementUtils(), processingEnv.getTypeUtils(),
            processingEnv.getMessager(), processingEnv.getFiler());
    entityParser = new EntityParser(aptUtils);
}

From source file:com.airbnb.deeplinkdispatch.DeepLinkProcessor.java

@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    filer = processingEnv.getFiler();
    messager = processingEnv.getMessager();
}

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();
}