All Implemented Interfaces:
Processor, OptionConfiguration

@RelevantJavaTypes(java.util.Collection.class) @StubFiles("javaparser.astub") @SuppressWarningsPrefix({"iterator","modifiability"}) public class IteratorChecker extends ModifiabilityBaseChecker
A type-checker that checks whether a collection's iterator preserves the collection's modifiability.

The checker enforces the iterator portion of the Modifiability type system, where @IteratorPolyMod collections have iterators that preserve relevant modifiability capabilities and @MaybeIteratorPolyMod collections have unknown iterator-preservation behavior.

See the Checker Framework Manual:
Modifiability Checker
  • Constructor Details

    • IteratorChecker

      public IteratorChecker()
      Creates an IteratorChecker.
  • Method Details

    • usesIteratorChecker

      protected boolean usesIteratorChecker()
      Description copied from class: ModifiabilityBaseChecker
      Returns true if this checker refines the result of iterator() and listIterator(), and therefore needs to read the Iterator Checker's qualifiers. The Iterator Checker itself does not (it would be its own subchecker), and neither does the SeqGrow Checker, because an iterator has no sequenced-grow methods.
      Overrides:
      usesIteratorChecker in class ModifiabilityBaseChecker
      Returns:
      true if this checker needs the Iterator Checker as a subchecker