Annotation Type MustCall
-
@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER}) @SubtypeOf(MustCallUnknown.class) @DefaultQualifierInHierarchy @DefaultFor(EXCEPTION_PARAMETER) public @interface MustCall
An expression of type@MustCall({"m1", "m2"})may be obligated to callm1()and/orm2()before it is deallocated, but it is not obligated to call any other methods.This annotation is enforced by the Object Construction Checker's
-AcheckMustCallmode. It enforces that the methodsm1()andm2()are called on the annotated expression before it is deallocated.The subtyping relationship is:
@MustCall({"m1"}) <: @MustCall({"m1", "m2"})
-
-
Element Detail
-
value
String[] value
Methods that might need to be called on the expression whose type is annotated.- Returns:
- methods that might need to be called
- Default:
- {}
-
-