org.jboss.logging.processor.model

## Interface Parameter

All Superinterfaces:
  Comparable<Parameter>, MessageObject, MessageObjectType

    public interface Parameter
    extends Comparable<Parameter>, MessageObjectType

Author:
  James R. Perkins - 20.Feb.2011

### Nested Class Summary

Nested Classes
`static class` `Parameter.ParameterType` The types of parameters.

### Method Summary

Methods
`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.
`org.jboss.logging.annotations.Pos` `pos()` The position annotation if this the `parameterType()` is `Parameter.ParameterType.POS`.
`String` `targetName()` Returns the name of the target field or method.
`org.jboss.logging.annotations.Transform` `transform()` The transform type if this the `parameterType()` is `Parameter.ParameterType.TRANSFORM`.
`String` `type()` The full type name of the parameter.

### Methods inherited from interface java.lang.Comparable

`compareTo`

### Methods inherited from interface org.jboss.logging.processor.model.MessageObjectType

`isAssignableFrom, isSameAs, isSubtypeOf`

### Methods inherited from interface org.jboss.logging.processor.model.MessageObject

`reference`

### Method Detail

#### type

    String type()

The full type name of the parameter. For example `java.lang.String` if the parameter is a string. If the parameter is a primitive, the primitive name is returned.

Specified by:
  `type` in interface `MessageObjectType`
Returns:
  the qualified type of the parameter.

#### name

    String name()

The variable name of the parameter.

Specified by:
  `name` in interface `MessageObject`
Returns:
  the variable name of the parameter.

#### isArray

    boolean isArray()

Returns `true` if the type is an array, otherwise `false`.

Returns:
  `true` if an array, otherwise `false`

#### isPrimitive

    boolean isPrimitive()

Returns `true` if the type is a primitive type, otherwise `false`.

Returns:
  `true` if primitive type, otherwise `false`

#### isVarArgs

    boolean isVarArgs()

Returns `true` if the parameter is a var args parameter, otherwise `false`.

Returns:
  `true` if var args parameter, otherwise `false`.

#### parameterType

    Parameter.ParameterType parameterType()

Returns the `parameter type` of the parameter.

Returns:
  the parameter type of the parameter.

#### formatterClass

    String formatterClass()

The formatter class, or `null` if there is none.

Returns:
  the formatter class

#### paramClass

    Class<?> paramClass()

Returns the class if the parameter is annotated with `Param`. If the annotation is not present, `null` is returned.

Returns:
  the parameter class or `null`.

#### targetName

    String targetName()

Returns the name of the target field or method. For example if the `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.

Returns:
  the target field name, method name or an empty string.

#### transform

    org.jboss.logging.annotations.Transform transform()

The transform type if this the `parameterType()` is `Parameter.ParameterType.TRANSFORM`.

Returns:
  the transform annotation or `null` if not a transform parameter

#### pos

    org.jboss.logging.annotations.Pos pos()

The position annotation if this the `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);

Returns:
  the position annotation or `null` if not a position parameter