Package org.incendo.cloud.annotations
Annotation Type Default
When used on a method parameter:
Used to give an optional
When used on a method:
Used to indicate that a method is a
Used to give an optional
Argument a DefaultValue.
If value() is used then a parsed default value will be created. If name() is used then a dynamic
default value registered to the DefaultValueRegistry will be used.
When used on a method:
Used to indicate that a method is a
DefaultValueFactory. The method must return a
DefaultValue instance. The only accepted method parameter is a
Parameter which represents the parameter that the default value is being created for.-
Optional Element Summary
Optional Elements
-
Element Details
-
value
Returns the default value.name()will take priority when non-empty and used on a parameter.This value will be parsed when the command is being parsed in the case that the optional parameter has been omitted.
- Returns:
- the default value
- Default:
""
-
name
If used on a parameter this returns the name of theDefaultValueFactoryused to create the default value.If used on a method, this indicates the name of the
DefaultValueFactoryrepresented by the method. If this is empty, the method name will be used.The factories must be registered to the
DefaultValueRegistryretrieved throughAnnotationParser.defaultValueRegistry(). UsingAnnotationParser.parse(Object[])will scan & register all@Default-annotated methods.- Returns:
- name of the default value registry to use
- Default:
""
-