@PostconditionAnnotation(qualifier=CalledMethods.class) @Target(value={METHOD,CONSTRUCTOR}) public @interface EnsuresCalledMethods
Consider the following method:
@EnsuresCalledMethods(value = "#1", methods = "m") public void callM(T t) { ... }
This method guarantees that t.m()
is always called before the method returns.
If a class has any @
Owning
fields, then one or more of its must-call methods should be annotated to indicate that the
must-call obligations are satisfied. The must-call methods are those named by the @
MustCall
or @
InheritableMustCall
annotation on
the class declaration, such as close()
. Here is a common example:
@EnsuresCalledMethods(value = {"owningField1", "owningField2"}, methods = "close") public void close() { ... }
public abstract String[] value
EnsuresQualifier
@QualifierArgument(value="value") public abstract String[] methods