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

uk.autores.Processing Maven / Gradle / Ivy

There is a newer version: 11.0.35-beta
Show newest version
package uk.autores;

import uk.autores.naming.Namer;

import javax.annotation.processing.Filer;
import javax.tools.JavaFileManager;
import javax.tools.StandardLocation;

/**
 * Common processing instructions annotation.
 * The compiler must be able to load and instantiate any value set in {@link #namer()}.
 */
public @interface Processing {
    /**
     * Set this value to provide alternative class/member naming strategy.
     *
     * @return name generator type
     * @see Namer Namer for provided implementations
     */
    Class namer() default Namer.class;

    /**
     * 

* These values are passed as location (1st arg) to * {@link Filer#getResource(JavaFileManager.Location, CharSequence, CharSequence)} * in order. *

*

* The defaults are {@link StandardLocation#CLASS_PATH} and {@link StandardLocation#CLASS_OUTPUT} names. *

*

* Tools are inconsistent in how they locate resources. * The documentation for {@link Filer} states * "The locations CLASS_OUTPUT and SOURCE_OUTPUT must be supported." * If the filer throws an {@link IllegalArgumentException} the processor will * proceed to the next location. *

* * @return where to search for resources * @see StandardLocation#locationFor(String) * @see StandardLocation#getName() */ String[] locations() default { "CLASS_OUTPUT", // IntelliJ likes this "CLASS_PATH", // Maven likes this, Eclipse compiler throws IllegalArgumentException }; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy