Top Description Inners Fields Methods
org.jboss.logging.annotations

public @Interface Message

extends Annotation
Annotations
@Target:METHOD
@Retention:CLASS
@Documented
Static Imports
java.lang.annotation.ElementType.METHOD, .RetentionPolicy.CLASS

Assigns a message string to a resource method. The method arguments are used to supply the positional parameter values for the method.
Author
David M. Lloyd

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Message.Format

The possible format types.

Field Summary

Modifier and TypeField and Description
public static final int
INHERIT

Indicates that this message should inherit the ID from another message with the same name.

public static final int
NONE

Indicates that this message has no ID.

Method Summary

Modifier and TypeMethod and Description
public Message.Format

Returns:

the format type
format
()

The format type of this method (defaults to Format#PRINTF).

public int

Returns:

the message ID number
id
()

The message ID number.

public String

Returns:

the format string
value
()

The default format string of this message.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Field Detail

INHERITback to summary
public static final int INHERIT

Indicates that this message should inherit the ID from another message with the same name.

NONEback to summary
public static final int NONE

Indicates that this message has no ID.

Method Detail

formatback to summary
public Message.Format format()

The format type of this method (defaults to Format#PRINTF).

Returns:Message.Format

the format type

idback to summary
public int id()

The message ID number. Only one message with a given name may specify an ID other than INHERIT.

Returns:int

the message ID number

valueback to summary
public String value()

The default format string of this message.

Expressions in the form of ${property.key:default-value} can be used for the value. If the property key is prefixed with sys. a system property will be used. If the key is prefixed with env. an environment variable will be used. In all other cases the org.jboss.logging.tools.expressionProperties processor argument is used to specify the path the properties file which contains the values for the expressions.

Returns:String

the format string

org.jboss.logging.annotations back to summary

public final Enum Message.Format

extends Enum<Message.Format>
Class Inheritance

The possible format types.

Field Summary

Modifier and TypeField and Description
public static final Message.Format
public static final Message.Format
NO_FORMAT

Indicates the message should not be formatted.

public static final Message.Format
PRINTF

A java.util.Formatter-type format string.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Message.Format
public static Message.Format[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

MESSAGE_FORMATback to summary
public static final Message.Format MESSAGE_FORMAT

A java.text.MessageFormat-type format string.

NO_FORMATback to summary
public static final Message.Format NO_FORMAT

Indicates the message should not be formatted.

PRINTFback to summary
public static final Message.Format PRINTF

A java.util.Formatter-type format string.

Constructor Detail

Formatback to summary
private Format()

Method Detail

valueOfback to summary
public static Message.Format valueOf(String name)
valuesback to summary
public static Message.Format[] values()