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

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

Go to download

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

There is a newer version: 0.11
Show 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}", getRuntimeModule());
    }

    public ${JAVA_CLASS_NAME}() {
        final Module currentModule = getClass().getModule();
        if (currentModule.isNamed()) {
            Stream.concat(
                    Stream.of(
                            getClass().getClassLoader().getUnnamedModule()
                    ),
                    Stream.of(
                            getRuntimeModule(),
                            getToolCommonModule()
                    ).filter(m -> m.isNamed())
            ).forEach(moduleName -> currentModule.getPackages().forEach(packageName -> {
                currentModule.addOpens(packageName, moduleName);
                System.out.println(format(
                        "opens ?/? to ?",
                        currentModule.getName(),
                        packageName,
                        moduleName.isNamed() ? moduleName.getName() : "ALL-UNNAMED")
                );
            }));
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy