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 ProcessContext context);

    int DEFAULT_STAGE = 0;
    int POST_PROCESSING_STAGE = 900_000;
    int VALIDATION_STAGE = 1_000_000;
    int COLLECTION_STAGE = 1_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