ftl.test.$$IntegrationTestFixerTemplateftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxmicro-annotation-processor Show documentation
Show all versions of rxmicro-annotation-processor Show documentation
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"
);
}
}
}
}
}