### Elasticsearch Version

master

### Installed Plugins

N/A

### Java Version

_bundled_

### OS Version

N/A

### Problem Description

@arteam [observed](https://github.com/elastic/elasticsearch/pull/83221/files#r795474431) that `static record` is redundant, records are apparently implicitly static. I think we should make sure that Checkstyle picks this up rather than needing human involvement.

### Steps to Reproduce

Mark a record declaration as `static` and observe that `./gradlew precommit` still passes.

### Logs (if relevant)

_No response_
x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/Function.java
* @return true if the collector optimizes change detection
         */
        boolean isOptimized();
        /**
         * Whether the collector requires an extra query to identify the changes.
         *
         * @return true if collector requires an extra query for identifying changes
         */
        boolean queryForChanges();
    }
    /**
     * Deduce mappings based on the input mappings and the known configuration.
     *
     * @param client a client instance for querying the source mappings
     * @param sourceConfig the source configuration
     * @param listener listener to take the deduced mapping
     */
    void deduceMappings(Client client, SourceConfig sourceConfig, ActionListener<Map<String, String>> listener);
    /**
     * Create a preview of the function.
     *
     * @param client a client instance for querying
     * @param headers headers to be used to query only for what the caller is allowed to
     * @param sourceConfig the source configuration
     * @param fieldTypeMap mapping of field types
     * @param numberOfRows number of rows to produce for the preview
     * @param listener listener that takes a list, where every entry corresponds to 1 row/doc in the preview
     */
    void preview(
        Client client,