public interface MessageMethod extends Comparable<MessageMethod>, MessageObject, JavaDocComment
Modifier and Type | Interface and Description |
---|---|
static interface |
MessageMethod.Message
Represents a
Message annotation on a method. |
Modifier and Type | Method and Description |
---|---|
Parameter |
cause()
|
int |
formatParameterCount()
Returns the number of parameters minus the cause parameter count for the method.
|
boolean |
hasCause()
Returns
true if there is a cause element, otherwise false . |
boolean |
inheritsMessage()
Indicates whether the message was inherited from another message or not.
|
boolean |
isLoggerMethod()
Returns
true if this is a logger method, otherwise false . |
boolean |
isOverloaded()
Returns
true if the method is overloaded, otherwise false
. |
String |
loggerMethod()
Returns the LogMessage annotation associated with this method only if
isLoggerMethod() returns
true . |
String |
logLevel()
Returns the log level parameter associated with the method only if
isLoggerMethod() returns
true . |
MessageMethod.Message |
message()
The
MessageMethod.Message to be used for the method. |
String |
messageMethodName()
Returns the name of the method used to retrieve the message.
|
String |
name()
Returns the method name.
|
Set<Parameter> |
parameters(Parameter.ParameterType parameterType)
Returns an unmodifiable collection of the parameters specified by the parameter type or an empty set.
|
Set<Parameter> |
parameters(Parameter.ParameterType parameterType,
Parameter.ParameterType... parameterTypes)
Returns an unmodifiable collection of the parameters specified by the parameter type or an empty set.
|
ExecutableElement |
reference()
The object used to extract information for the message logger or message bundle, if applicable.
|
ReturnType |
returnType()
Returns the return type for the method.
|
Set<ThrowableType> |
thrownTypes()
Returns a collection of throwable types the method throws.
|
String |
translationKey()
Returns the name of the key used in the translation files for the message translation.
|
compareTo
getComment
String name()
name
in interface MessageObject
Set<Parameter> parameters(Parameter.ParameterType parameterType)
parameterType
- the parameter type to look-up the parameters for.Set<Parameter> parameters(Parameter.ParameterType parameterType, Parameter.ParameterType... parameterTypes)
parameterType
- the parameter type to look-up the parameters for.parameterTypes
- an array of types to look-up parameters for.ReturnType returnType()
Set<ThrowableType> thrownTypes()
MessageMethod.Message message()
MessageMethod.Message
to be used for the method.boolean inheritsMessage()
true
is returned the
MessageMethod.Message
was inherited from a different method, otherwise false
.
Note: false
does not indicate the method has a Message
annotation.true
if the message was inherited from a different method, otherwise false
.String messageMethodName()
String translationKey()
boolean hasCause()
true
if there is a cause element, otherwise false
.true
if there is a cause element, otherwise false
boolean isOverloaded()
true
if the method is overloaded, otherwise false
.true
if the method is overloaded, otherwise false
Parameter cause()
null
.String loggerMethod()
isLoggerMethod()
returns
true
.String logLevel()
isLoggerMethod()
returns
true
.int formatParameterCount()
boolean isLoggerMethod()
true
if this is a logger method, otherwise false
.true
if this is a logger method, otherwise false
.ExecutableElement reference()
MessageObject
ExecutableElement
might be returned.reference
in interface MessageObject
Copyright © 2017 JBoss by Red Hat. All rights reserved.