public interface Parameter extends Comparable<Parameter>, MessageObjectType
| Modifier and Type | Interface and Description |
|---|---|
static class |
Parameter.ParameterType
The types of parameters.
|
| Modifier and Type | Method and Description |
|---|---|
String |
formatterClass()
The formatter class, or
null if there is none. |
boolean |
isArray()
Returns
true if the type is an array, otherwise false. |
boolean |
isPrimitive()
Returns
true if the type is a primitive type, otherwise false. |
boolean |
isVarArgs()
Returns
true if the parameter is a var args parameter, otherwise false. |
String |
name()
The variable name of the parameter.
|
Class<?> |
paramClass()
Returns the class if the parameter is annotated with
Param. |
Parameter.ParameterType |
parameterType()
Returns the
parameter type of the parameter. |
Pos |
pos()
The position annotation if this the
parameterType() is Parameter.ParameterType.POS. |
String |
targetName()
Returns the name of the target field or method.
|
Transform |
transform()
The transform type if this the
parameterType() is Parameter.ParameterType.TRANSFORM. |
String |
type()
The full type name of the parameter.
|
compareToisAssignableFrom, isSameAs, isSubtypeOfreferenceString type()
java.lang.String if the parameter is a string. If the
parameter is a primitive, the primitive name is returned.type in interface MessageObjectTypeString name()
name in interface MessageObjectboolean isArray()
true if the type is an array, otherwise false.true if an array, otherwise falseboolean isPrimitive()
true if the type is a primitive type, otherwise false.true if primitive type, otherwise falseboolean isVarArgs()
true if the parameter is a var args parameter, otherwise false.true if var args parameter, otherwise false.Parameter.ParameterType parameterType()
parameter type of the parameter.String formatterClass()
null if there is none.Class<?> paramClass()
Param.
If the annotation is not present, null is returned.null.String targetName()
parameterType() returns
Parameter.ParameterType.FIELD, the target name is the name of the field to set on the
return type. If no target name is defined an empty String
is
returned.Transform transform()
parameterType() is Parameter.ParameterType.TRANSFORM.null if not a transform parameterPos pos()
parameterType() is Parameter.ParameterType.POS.
This works the same way the formatter positional characters work.
String.format("Numeric value %1$d (%1$x)");
@Message(""Numeric value %d (%x)"")
void logNumericValue(@Pos(1) int value);
null if not a position parameterCopyright © 2014 JBoss by Red Hat. All Rights Reserved.