Annotation Interface Argument.Index
- Enclosing class:
Argument
Reads the argument at the given index of the constructor or factory call that produced the
value. Paired with
Method.Calls or Method.Chain, reads it from the matched
call instead.
// new Color(255, 128, 0)
@Argument.Index(1)
Integer green();
If the return type is a conduit and the argument at that index doesn't match it, the
arguments starting there are regrouped to fit the return type's own Argument.Index
methods. That covers a class flattening another class's fields into its constructor.
-
Required Element Summary
Required Elements
-
Element Details
-
value
int valueThe index of the argument to read.- Returns:
- the argument index, counted from zero
-