jass.modern
Annotation Type Length


@Documented
@Target(value={PARAMETER,FIELD,METHOD})
@Level2Desugarable(pattern="@Target.@Length == @ValueOf(value)",
                   types={jass.modern.core.util.Primitive.Array.class,java.lang.String.class,java.util.Collection.class})
public @interface Length

A parameter annotation which is used to specify the length/size of an array, the size of any subtype of the superinterface Collection, and for the length of Strings.

public void m (@Length(12) int[] monkeys){    }
is equivalent to
 @Spec( @Case( pre="monkeys.length == 12"))
 public void m (int[] monkeys){    }
 
even better
void m(@Length(3) String p){    }
which is the same as
 @Spec( @Case( pre="p.length() == 3"))
 void m(String p){      }
 

Author:
riejo

Required Element Summary
 long value
          The length of the array or collection.
 

Element Detail

value

public abstract long value
The length of the array or collection. Addresses the 1st dimension always.

Returns: