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

ftl.test.$$IntegrationTestFixerTemplateftl Maven / Gradle / Ivy

Go to download

The RxMicro Annotation Processor main module that contains the annotation processor classes.

The newest version!
<#include "../common-lib.javaftl">
<#-- -------------------------------------------------------------------------------------------------------- -->
public final class ${JAVA_CLASS_NAME} {

    static {
        final Module currentModule = ${JAVA_CLASS_NAME}.class.getModule();
        currentModule.addExports("${PACKAGE_NAME}", RX_MICRO_REFLECTION_MODULE);
    }

    public ${JAVA_CLASS_NAME}() {
        final Module currentModule = getClass().getModule();
        if (currentModule.isNamed()) {
            logInfoTestMessage("Fix the environment for integration test(s)...");
            final Module unnamedModule = getClass().getClassLoader().getUnnamedModule();
            final Set modules = unmodifiableOrderedSet(unnamedModule, RX_MICRO_REFLECTION_MODULE);
            for (final Module module : modules) {
                for (final String packageName : currentModule.getPackages()) {
                    currentModule.addOpens(packageName, module);
                    logInfoTestMessage(
                            "opens ?/? to ?",
                            currentModule.getName(),
                            packageName,
                            module.isNamed() ? module.getName() : "ALL-UNNAMED"
                    );
                }
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy