Annotation Type MayBeUninitialized


@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface MayBeUninitialized
Indicate that a collection may be intentionally uninitialized.

Operations on an uninitialized collection will always raise a UninitializedCollectionException.

Author:
poirigui
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Indicate that the collection may be uninitialized but always has a size.
  • Element Details

    • hasSize

      boolean hasSize
      Indicate that the collection may be uninitialized but always has a size.

      This means that Collection.size() and Collection.isEmpty() will work as usual.

      Default:
      false