Package: org.apache.groovy.contracts.generation

## [Java] Class ContractExecutionTracker

- org.apache.groovy.contracts.generation.ContractExecutionTracker

-     public class ContractExecutionTracker
      extends Object

  Keeps track of contract executions to avoid cyclic contract checks.

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `ContractExecutionTracker.ContractExecution` | Identifies one contract execution so recursive re-entry can be suppressed.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static void` | `clear(String className, String methodIdentifier, String assertionType, boolean isStatic)` Removes a previously tracked contract execution from the current thread.
    `` | `public static boolean` | `track(String className, String methodIdentifier, String assertionType, boolean isStatic)` Attempts to register a contract execution for the current thread.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### @GroovyABI(since = "4.0.0")
      public static void clear(String className, String methodIdentifier, String assertionType, boolean isStatic)

      Removes a previously tracked contract execution from the current thread.

      Parameters:
        `className` - the declaring class name
        `methodIdentifier` - the executable identifier
        `assertionType` - the logical contract kind
        `isStatic` - whether the executable is static

    - #### public static boolean track(String className, String methodIdentifier, String assertionType, boolean isStatic)

      Attempts to register a contract execution for the current thread.

      Parameters:
        `className` - the declaring class name
        `methodIdentifier` - the executable identifier
        `assertionType` - the logical contract kind
        `isStatic` - whether the executable is static
      Returns:
        `true` if the execution was newly tracked, `false` if it was already active