Annotation Type EnsuresCalledMethodsVarArgs
-
@Target({METHOD,CONSTRUCTOR}) public @interface EnsuresCalledMethodsVarArgs
Indicates that the method, if it terminates successfully, always invokes the given methods on all of the arguments passed in the varargs position.Consider the following method:
@EnsuresCalledMethodsVarArgs("m") public void callMOnAll(S s, T t...) { ... }This method guarantees that
m()is always called on everyTobject passed in thetvarargs argument before the method returns.This annotation is not checked. An error will always be issued when it is used.
-
-
Element Detail
-
value
String[] value
Returns the methods guaranteed to be invoked on the varargs parameters.- Returns:
- the methods guaranteed to be invoked on the varargs parameters
-
-