Skip to content

Commit

Permalink
forgot to add this annotation file
Browse files Browse the repository at this point in the history
  • Loading branch information
elucash committed May 14, 2015
1 parent b251a81 commit fe3f34d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions value-annotations/src/org/immutables/value/Value.java
Expand Up @@ -500,6 +500,34 @@
*/
boolean strictBuilder() default false;

/**
* When {@code true} — all attributes are considered as they are annotated with
* {@link Value.Parameter}. Explicit {@link Value.Parameter} could then be used to specify
* order, but otherwise will not make any difference, if order is not specified, source
* definition order is used as expected. This style could be used to create special
* tuple-style annotations:
*
* <pre>
* {@literal @}Value.Style(
* typeImmutable = "*Tuple",
* allParameters = true,
* defaults = {@literal @}Value.Immutable(builder = false))
* public @interface Tuple {}
*
* {@literal @}Tuple
* {@literal @}Value.Immutable
* interface Color {
* int red();
* int green();
* int blue();
* }
*
* ColorTuple.of(0xFF, 0x00, 0xFE);
* </pre>
* @return if all attributes will be considered parameters
*/
boolean allParameters() default false;

/**
* Specify the mode in which accibility visibility is derived from abstract value type.
* It is a good idea to not specify such attributea inline with immutable values, but rather
Expand Down

0 comments on commit fe3f34d

Please sign in to comment.