@Target({PARAMETER,FIELD})
@Retention(RUNTIME)
@Documented
@MinMuleVersion("4.4")
public @interface Optional
Marks a
Parameter field a optional. All configurable attributes that don't include this annotation are considered
required- Since:
- 1.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe default value to use if the user doesn't specify a value for the parameter. -
Field Summary
Fields
-
Field Details
-
PAYLOAD
Denotes that if the parameter is not defined, the value will be taken from the message payload.- See Also:
-
NULL
Because Java doesn't allownullvalues as defaults in annotations, this value is used to represent anull. This value should only be used by the platform- See Also:
-
-
Element Details
-
defaultValue
String defaultValueThe default value to use if the user doesn't specify a value for the parameter. It can be the value itself or an expression. Sincenullvalues are not allowed as default values in java annotations, the specialNULLvalue was to created to reference that the parameter should default tonull- Returns:
- the default value
- Default:
- "THIS IS A SPECIAL NULL VALUE - DO NOT USE"
-