Annotation Type Owning


  • @Retention(RUNTIME)
    @Target({METHOD,PARAMETER,FIELD})
    public @interface Owning
    Annotation indicating that ownership should be transferred to the annotated parameter, field, or (when written on a method) return type, for the purposes of Must Call checking. Static fields cannot be owning.

    Method return types are treated as if they have this annotation by default unless their method is annotated as NotOwning.

    When the -AnoLightweightOwnership command-line argument is passed to the checker, this annotation and NotOwning are ignored.