<commit_before>/*
 * Copyright 2014 - Present <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.bytebuddy.build.gradle;

import net.bytebuddy.utility.nullability.MaybeNull;
import org.gradle.api.Project;
import org.gradle.api.file.FileCollection;

/**
 * A Byte Buddy task extension.
 */
public class ByteBuddyTaskExtension extends AbstractByteBuddyTaskExtension<ByteBuddyTask> {

    /**
     * The incremental builder to apply or {@code null} if no incremental build should be applied.
     */
    @MaybeNull
    private IncrementalResolver incrementalResolver;

    /**
     * {@code true} if the class path is considered to be incremental.
     */
    private boolean incrementalClassPath;

    /**
     * A set of classes that is used for discovery of plugins.
     */
    @MaybeNull
    private FileCollection discoverySet;

    /**
     * Creates a new Byte Buddy task extension.
     *
     * @param project The current Gradle project.
     */
    public ByteBuddyTaskExtension(Project project) {
        super(project);
        incrementalResolver = IncrementalResolver.ForChangedFiles.INSTANCE;
    }

    /**
     * Returns the incremental builder to apply or {@code null} if no incremental build should be applied.
     *
     * @return The incremental builder to apply or {@code null} if no incremental build should be applied.
     */
    @MaybeNull
    public IncrementalResolver getIncrementalResolver() {
        return incrementalResolver;
    }

    /**
     * Sets the incremental builder to apply or {@code null} if no incremental build should be applied.
     *
     * @param incrementalResolver The incremental builder to apply or {@code null} if no incremental build should be applied.
     */
    public void setIncrementalResolver(@MaybeNull IncrementalResolver incrementalResolver) {
        this.incrementalResolver = incrementalResolver;
    }

    /**
     * Returns {@code true} if the class path should be considered incremental. By default, the class path
     * is considered non-incremental where all classes are retransformed if the class path changes.
     *
     * @return {@code true} if the class path should be considered incremental.<commit_msg>Add missing inject annotation.<commit_after>/*
 * Copyright 2014 - Present <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.bytebuddy.build.gradle;

import net.bytebuddy.utility.nullability.MaybeNull;
import org.gradle.api.Project;
import org.gradle.api.file.FileCollection;

import javax.inject.Inject;

/**
 * A Byte Buddy task extension.
 */
public class ByteBuddyTaskExtension extends AbstractByteBuddyTaskExtension<ByteBuddyTask> {

    /**
     * The incremental builder to apply or {@code null} if no incremental build should be applied.
     */
    @MaybeNull
    private IncrementalResolver incrementalResolver;

    /**
     * {@code true} if the class path is considered to be incremental.
     */
    private boolean incrementalClassPath;

    /**
     * A set of classes that is used for discovery of plugins.
     */
    @MaybeNull
    private FileCollection discoverySet;

    /**
     * Creates a new Byte Buddy task extension.
     *
     * @param project The current Gradle project.
     */
    @Inject
    public ByteBuddyTaskExtension(Project project) {
        super(project);
        incrementalResolver = IncrementalResolver.ForChangedFiles.INSTANCE;
    }

    /**
     * Returns the incremental builder to apply or {@code null} if no incremental build should be applied.
     *
     * @return The incremental builder to apply or {@code null} if no incremental build should be applied.
     */
    @MaybeNull
    public IncrementalResolver getIncrementalResolver() {
        return incrementalResolver;
    }

    /**
     * Sets the incremental builder to apply or {@code null} if no incremental build should be applied.
     *
     * @param incrementalResolver The incremental builder to apply or {@code null} if no incremental build should be applied.
     */
    public void setIncrementalResolver(@MaybeNull IncrementalResolver incrementalResolver) {
        this.incrementalResolver = incrementalResolver;
    }

    /**
     * Returns {@code true} if the class path should be considered incremental. By default, the class path
     * is considered non-incremental where all classes are retransformed if the class path changes.
     *
     * @return {@code true} if the class path should be considered incremental.
{'fraction_non_alphanumeric': 0.07226064797961412, 'fraction_numerical': 0.0029122679286494356, 'mean_word_length': 3.185072353389185, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6444945', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1327, 'n_words': 577}