uk.autores.Texts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annotations Show documentation
Show all versions of annotations Show documentation
Annotation driven library for handling embedded resources
// Copyright 2024 https://github.com/autores-uk/autores/blob/main/LICENSE.txt
// SPDX-License-Identifier: Apache-2.0
package uk.autores;
import uk.autores.handling.GenerateStringsFromText;
import uk.autores.naming.IdiomaticNamer;
import uk.autores.repeat.RepeatableTexts;
import java.lang.annotation.*;
/**
* Annotation for {@link GenerateStringsFromText}.
*
*
* // EXAMPLE ANNOTATION
* @Texts("Roses.txt")
*
*
* // EXAMPLE CODE
* String roses = Roses.text();
*
*/
@Target({ElementType.PACKAGE, ElementType.TYPE})
@Retention(RetentionPolicy.SOURCE)
@Repeatable(RepeatableTexts.class)
public @interface Texts {
/**
* Resource files.
* @return text resources
*/
String[] value() default {};
/**
* Common processing instructions.
* @return instruction annotation
*/
Processing processing() default @Processing(namer = IdiomaticNamer.class);
/**
* Generated code visibility.
* @return visibility
*/
boolean isPublic() default false;
/**
* Code generation strategy.
* @return strategy
*/
Strategy strategy() default Strategy.AUTO;
/**
* Resource text encoding.
* @return canonical encoding name
*/
String encoding() default "UTF-8";
}