Module uk.autores.processing
Package uk.autores.processing.handlers
Class GenerateConstantsFromProperties
java.lang.Object
uk.autores.processing.handlers.GenerateConstantsFromProperties
- All Implemented Interfaces:
uk.autores.handling.Handler
public final class GenerateConstantsFromProperties
extends Object
implements uk.autores.handling.Handler
Use this code generation
Handler to prevent misspelled keys with ResourceBundle.
For every Properties file defined as a resource:
- Generates a class based on the .properties file name using
Namer.simplifyResourceName(String)andNamer.nameType(String) - Adds a
Stringconstant named from the property key usingNamer.nameConstant(String)
-
Constructor Details
-
GenerateConstantsFromProperties
public GenerateConstantsFromProperties()Ctor
-
-
Method Details
-
config
All configuration is optional.
Use "visibility" to make the generated classes public.
- Specified by:
configin interfaceuk.autores.handling.Handler- Returns:
- visibility
- See Also:
-
handle
- Specified by:
handlein interfaceuk.autores.handling.Handler- Throws:
Exception
-