Class MustCallInference
@
Owning
on owning fields and parameters, @
EnsuresCalledMethods
on methods, and @
InheritableMustCall
on class declarations.
Each instance of this class corresponds to a single control flow graph (CFG), typically representing a method.
The algorithm determines if the @MustCall obligation of a field is satisfied along some path leading to the regular exit point of the method. If the obligation is satisfied, it adds an @Owning annotation on the field and an @EnsuresCalledMethods annotation on the method being analyzed. Additionally, if the method being analyzed satisfies the must-call obligation of all the enclosed owning fields, it adds a @InheritableMustCall annotation on the enclosing class.
Note: This class makes the assumption that the must-call set has only one element. Must-call sets with more than one element may be supported in the future.
See ResourceLeakChecker.ENABLE_WPI_FOR_RLC
for an explanation of the meaning of the
flags -Ainfer
and -AenableWpiForRlc
.
-
Field Summary
-
Method Summary
-
Field Details
-
OWNING
TheOwning
annotation.
-