org.javalid.annotations.core
Annotation Type JvParam


@Target(value={})
@Retention(value=RUNTIME)
@Documented
public @interface JvParam

This annotation is used by @JvMethod to set input parameters for a method call.

Since:
1.0
Version:
1.0
Author:
M.Reuvers

Optional Element Summary
 java.lang.Class beanClass
          The bean class to instantiate, only relevant if MODE_BEAN.
 java.lang.String lookupName
          Name of bean to lookup.
 java.lang.String methodName
          Optional methodname (must be a getMethod returning a value e.g. getName) to be called on the found lookup instance or bean.
 boolean requiresMethodCall
          Only relevant if a lookup and/or bean mode is specified.
 java.lang.String type
          Specify the exact type of this parameter, e.g. java.lang.String.
 java.lang.String value
          Literal value for this parameter (must be set if MODE_VALUE).
 int valueRetrievalMode
          The type of getting the value for this parameter.
 

valueRetrievalMode

public abstract int valueRetrievalMode
The type of getting the value for this parameter. Use one of the constants defined in this annotation.

Defaults to MODE_VALUE.

Default:
0

requiresMethodCall

public abstract boolean requiresMethodCall
Only relevant if a lookup and/or bean mode is specified. Default value is false.

Defaults to false.

Default:
false

value

public abstract java.lang.String value
Literal value for this parameter (must be set if MODE_VALUE). Leaving it empty for any non-string type (where type is e.g. java.lang.Integer) is converted to null value. Empty string is passed as empty string.

Defaults to an empty string.

Default:
""

type

public abstract java.lang.String type
Specify the exact type of this parameter, e.g. java.lang.String. Supported types are:
- java.lang.String
- java.lang.Byte
- java.lang.Short
- java.lang.Integer
- java.lang.Float
- java.lang.Double
- java.lang.Long
For other objects you should use beanclass or lookup.

Default:
""

lookupName

public abstract java.lang.String lookupName
Name of bean to lookup. Only relevant when MODE_LOOKUP_SPRING.

Note that this bean can be the input (parameter value) directly or that a getMethod() must be called on it and that return value is used. By default it is the bean found itself, to change the behavior set: requiresMethodCall to true.

Defaults to empty string.

Default:
""

methodName

public abstract java.lang.String methodName
Optional methodname (must be a getMethod returning a value e.g. getName) to be called on the found lookup instance or bean. Only called if requiresMethodCall is set to true, otherwise ignored.

Defaults to empty string.

Default:
""

beanClass

public abstract java.lang.Class beanClass
The bean class to instantiate, only relevant if MODE_BEAN. Must have a no-args constructor.

Note that this bean can be the input (parameter value) directly or that a getMethod() must be called on it and that the return value is used. By default it is the bean created itself, to change the behavior set: requiresMethodCall to true.

Defaults to something useless.

Default:
java.lang.Object.class