Package: groovy.typecheckers

## [Groovy] Class ModifiesChecker

- groovy.typecheckers.ModifiesChecker

-     @Incubating
      class ModifiesChecker
      extends TypeCheckingDSL

  A compile-time checker that verifies method bodies comply with their `@Modifies` frame condition declarations. Checks that:

  - Direct field assignments only target fields listed in `@Modifies`
  - Calls to methods on `this` are compatible with the declared frame
  - Calls on parameters/variables not in `@Modifies` use only non-mutating methods

  Non-mutating calls are determined by:

  1. Receiver type is immutable (String, Integer, etc.)
  2. Method is annotated `@Pure`
  3. Method name is in a known-safe whitelist (toString, size, get, etc.)

  This checker is opt-in:

       @TypeChecked(extensions = 'groovy.typecheckers.ModifiesChecker')

  Since:
    6.0.0
  See Also:
    Modifies

- - ### Constructor Summary

    Constructors
    Constructor and description
    `ModifiesChecker()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `Object` | `run()` Registers frame-condition checks for methods visited by the type checker.

- - ### Constructor Detail

    - #### ModifiesChecker()

  - ### Method Detail

    - #### @Override
      Object run()

      Registers frame-condition checks for methods visited by the type checker.