Class MessageLoggerTranslator
java.lang.Object
org.jboss.logging.processor.generator.model.ClassModel
org.jboss.logging.processor.generator.model.MessageLoggerTranslator
The java message logger translation class model.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate static final StringThe logger parameter name.private final Map<MessageMethod, String> The translation map.Fields inherited from class ClassModel
processingEnv, sourceFile -
Constructor Summary
ConstructorsConstructorDescriptionMessageLoggerTranslator(ProcessingEnvironment processingEnv, MessageInterface messageInterface, String className, String superClassName, String locale, Map<MessageMethod, String> translations) Create a MessageLogger with super class and interface. -
Method Summary
Modifier and TypeMethodDescriptionorg.jboss.jdeparser.JClassDefGenerate the code corresponding to this class modelMethods inherited from class ClassModel
addMessageMethod, addMessageMethod, createLocaleGetter, createReadResolveMethod, generateAndWrite, messageInterface, qualifiedClassName
-
Field Details
-
LOGGER_PARAMETER_NAME
-
translations
The translation map. -
locale
-
-
Constructor Details
-
MessageLoggerTranslator
public MessageLoggerTranslator(ProcessingEnvironment processingEnv, MessageInterface messageInterface, String className, String superClassName, String locale, Map<MessageMethod, String> translations) Create a MessageLogger with super class and interface.- Parameters:
processingEnv- the processing environmentmessageInterface- the message interface to implement.className- the implementation class name.superClassName- the super class namelocale- the locale used to override the default localetranslations- the translation map.
-
-
Method Details
-
generateModel
Description copied from class:ClassModelGenerate the code corresponding to this class model- Overrides:
generateModelin classClassModel- Returns:
- the generated code
- Throws:
IllegalStateException- if the class has already been defined.
-