Package org.immutables.value
Annotation Type Value.Parameter
-
@Documented @Target({METHOD,PARAMETER}) public static @interface Value.ParameterWorks withValue.Immutableclasses to mark abstract accessor method be included as "of(..)" constructor parameter.Following rules applies:
- No constructor generated if none of methods have
Value.Parameterannotation - For object to be constructable with a constructor - all non-default and non-derived
attributes should be annotated with
Value.Parameter.
- No constructor generated if none of methods have
-
-
Element Detail
-
order
int order
Used to specify order of constructor argument. It defaults to zero and allows for non-contiguous order values (arguments are sorted ascending by this order value).This attribute was introduced as potentially not all annotation processors could use source order of elements, i.e. order of declaration appearance in a source file. To support portable constructor argument definitions, developer should supply argument order explicitly. As of version 1.0, we implemented workaround for the Eclipse compiler, so it is not strictly needed to specify order, but it still might be needed if you wish to reorder arguments Since 2.5.6 the default value was changed to -1 to signify unspecified order, but the logic behind should not result in any practical incompatibilities.
- Returns:
- order
- Default:
- -1
-
-
-
value
boolean value
Specify asfalseto cancel out parameter: an attribute would not be considered as a parameter. This is useful to override the effect ofValue.Style.allParameters()flag. By default it istrueand should be omitted.- Returns:
falseif not a parameter
- Default:
- true
-
-