@Retention(value=RUNTIME) @Target(value={TYPE_USE,TYPE_PARAMETER}) @SubtypeOf(value=MustCallUnknown.class) @DefaultQualifierInHierarchy @DefaultFor(value=EXCEPTION_PARAMETER) public @interface MustCall
@MustCall({"m1", "m2"})
may be obligated to call m1()
and/or m2()
before it is deallocated, but it is not obligated to call any other methods.
This annotation is enforced by the Object Construction Checker's -AcheckMustCall
mode.
It enforces that the methods m1()
and m2()
are called on the annotated expression
before it is deallocated.
The subtyping relationship is:
@MustCall({"m1"}) <: @MustCall({"m1", "m2"})
public abstract String[] value