Class ClassModelHelper
- java.lang.Object
-
- org.jboss.logging.processor.generator.model.ClassModelHelper
-
public final class ClassModelHelper extends java.lang.Object
Utilities for the code model.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
STRING_ID_FORMAT2
-
Constructor Summary
Constructors Modifier Constructor Description private
ClassModelHelper()
Constructor for singleton model.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
formatMessageId(java.lang.String projectCode, int padLength, int messageId)
Formats message id.(package private) static java.lang.String
generatedDateValue()
Returns the current date formatted in the ISO 8601 format.static java.lang.String
implementationClassName(MessageInterface messageInterface)
Creates the implementation class name for the message interface.static java.lang.String
implementationClassName(MessageInterface messageInterface, java.lang.String translationSuffix)
Creates the implementation class name for the message interface.
-
-
-
Field Detail
-
STRING_ID_FORMAT2
private static final java.lang.String STRING_ID_FORMAT2
- See Also:
- Constant Field Values
-
-
Method Detail
-
generatedDateValue
static java.lang.String generatedDateValue()
Returns the current date formatted in the ISO 8601 format.- Returns:
- the current date formatted in ISO 8601.
-
formatMessageId
public static java.lang.String formatMessageId(java.lang.String projectCode, int padLength, int messageId)
Formats message id.- Parameters:
projectCode
- the project code for the messagemessageId
- the message id to format- Returns:
- the formatted message id
-
implementationClassName
public static java.lang.String implementationClassName(MessageInterface messageInterface) throws java.lang.IllegalArgumentException
Creates the implementation class name for the message interface.- Parameters:
messageInterface
- the message interface to generate the implementation name for.- Returns:
- the implementation class name
- Throws:
java.lang.IllegalArgumentException
- if the message interface is not a message bundle or a message logger.
-
implementationClassName
public static java.lang.String implementationClassName(MessageInterface messageInterface, java.lang.String translationSuffix) throws java.lang.IllegalArgumentException
Creates the implementation class name for the message interface.- Parameters:
messageInterface
- the message interface to generate the implementation name for.translationSuffix
- the local suffix for the translation.- Returns:
- the implementation class name
- Throws:
java.lang.IllegalArgumentException
- if the message interface is not a message bundle or a message logger.
-
-