All Downloads are FREE. Search and download functionalities are using the official Maven repository.

name.remal.gradle_plugins.api.classes_processing.ClassesProcessor Maven / Gradle / Ivy

There is a newer version: 1.9.2
Show newest version
package name.remal.gradle_plugins.api.classes_processing;

import org.jetbrains.annotations.NotNull;

public interface ClassesProcessor extends Comparable {

    void process(
        @NotNull byte[] bytecode,
        @NotNull BytecodeModifier bytecodeModifier,
        @NotNull String className,
        @NotNull String resourceName,
        @NotNull ProcessContext context
    );

    int PRIORITIZED_STAGE = -2_000_000;
    int DEFAULT_STAGE = 0;
    int POST_PROCESSING_STAGE = 900_000;
    int RELOCATION_STAGE = 1_900_000;
    int VALIDATION_STAGE = 2_000_000;
    int COLLECTION_STAGE = 2_100_000;

    default int getStage() {
        return DEFAULT_STAGE;
    }

    default int getOrder() {
        return 0;
    }

    @Override
    default int compareTo(@NotNull ClassesProcessor other) {
        int result = Integer.compare(getStage(), other.getStage());
        if (0 == result) result = Integer.compare(getOrder(), other.getOrder());
        return result;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy