Module uk.autores

Package uk.autores

An annotation driven library for working with embedded resource files. This package contains the core library functionality. See other packages for annotation processing and extensibility.

AUTORES

Usage

  1. Add import uk.autores.*;
  2. Annotate a package (ElementType.PACKAGE) or type (ElementType.TYPE) with one of the provided annotations
  3. Set String[] values() to the resource file names
Annotation Summary
Annotation Consumes Generates Description
ByteArrays any file class for all resources Generate class with method per file that returns byte[].
InputStreams any file class for all resources Generate single class with one InputStream method per file.
Keys properties class per resource Generate one constants class with keys per Properties file.
Messages properties class per resource Generate one localized, formatting message generator class per Properties file.
Texts text files class for all resources Generate class with method per text file that returns String.
ResourceFiles any file nothing (default) Validates the resource exists. Can be used to specify a Handler with custom behaviour.

Names

Generated type and member names are automatically derived from either the resource file name or the annotated package name. Generated names can be influenced by either using "name" properties (like ByteArrays.name()) or setting Processing.namer().

Custom names may be required where collisions occur or derived names are not valid identifiers.

Links