mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
Merge pull request #2745 from ebean-orm/feature/2733-rename-moduleInfoLoader
#2733 - Rename ModuleInfoLoader to EntityClassRegister and _Ebean$ModuleInfo to EbeanEntityRegister
This commit is contained in:
14 files changed
+32
-37
No files matched your search
@@ -113,7 +113,7 @@
|
||||
<annotationProcessorPath>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>13.6.2</version>
|
||||
<version>13.6.6-SNAPSHOT</version>
|
||||
</annotationProcessorPath>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
|
||||
+1
-1
@@ -30,5 +30,5 @@ interface Constants {
|
||||
|
||||
String MODULEINFO = "io.ebean.config.ModuleInfo";
|
||||
String METAINF_MANIFEST = "META-INF/ebean-generated-info.mf";
|
||||
String METAINF_SERVICES_MODULELOADER = "META-INF/services/io.ebean.config.ModuleInfoLoader";
|
||||
String METAINF_SERVICES_MODULELOADER = "META-INF/services/io.ebean.config.EntityClassRegister";
|
||||
}
|
||||
+2
-2
@@ -88,7 +88,7 @@ class ProcessingContext implements Constants {
|
||||
private List<String> loadedPrefixEntities = new ArrayList<>(); ;
|
||||
|
||||
/**
|
||||
* The package for the generated ModuleInfoLoader.
|
||||
* The package for the generated EntityClassRegister.
|
||||
*/
|
||||
private String factoryPackage;
|
||||
|
||||
@@ -537,7 +537,7 @@ class ProcessingContext implements Constants {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the class name of the generated ModuleInfoLoader
|
||||
* Return the class name of the generated EntityClassRegister
|
||||
* (such that we can read the current meta data for partial compile).
|
||||
*/
|
||||
String loadMetaInfServices() {
|
||||
|
||||
+3
-3
@@ -105,20 +105,20 @@ public class Processor extends AbstractProcessor implements Constants {
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
processingContext.logError(null, "Failed to initialise ModuleInfoLoader error:" + e + " stack:" + Arrays.toString(e.getStackTrace()));
|
||||
processingContext.logError(null, "Failed to initialise EntityClassRegister error:" + e + " stack:" + Arrays.toString(e.getStackTrace()));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeModuleInfoBean() {
|
||||
try {
|
||||
if (moduleWriter == null) {
|
||||
processingContext.logError(null, "ModuleInfoLoader was not initialised and not written");
|
||||
processingContext.logError(null, "EntityClassRegister was not initialised and not written");
|
||||
} else {
|
||||
moduleWriter.write();
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
processingContext.logError(null, "Failed to write ModuleInfoLoader error:" + e + " stack:" + Arrays.toString(e.getStackTrace()));
|
||||
processingContext.logError(null, "Failed to write EntityClassRegister error:" + e + " stack:" + Arrays.toString(e.getStackTrace()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@ class SimpleModuleInfoWriter {
|
||||
SimpleModuleInfoWriter(ProcessingContext processingContext) throws IOException {
|
||||
this.processingContext = processingContext;
|
||||
this.factoryPackage = processingContext.getFactoryPackage();
|
||||
this.factoryShortName = "_Ebean$ModuleInfo";
|
||||
this.factoryShortName = "EbeanEntityRegister";
|
||||
this.factoryFullName = factoryPackage + "." + factoryShortName;
|
||||
this.javaFileObject = processingContext.createWriter(factoryFullName);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ class SimpleModuleInfoWriter {
|
||||
writer.append("import %s;", Constants.GENERATED).eol();
|
||||
writer.eol();
|
||||
writer.append("import io.ebean.config.ModuleInfo;").eol();
|
||||
writer.append("import io.ebean.config.ModuleInfoLoader;").eol();
|
||||
writer.append("import io.ebean.config.EntityClassRegister;").eol();
|
||||
writer.eol();
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ class SimpleModuleInfoWriter {
|
||||
|
||||
buildAtContextModule(writer);
|
||||
|
||||
writer.append("public class %s implements ModuleInfoLoader {", factoryShortName).eol().eol();
|
||||
writer.append("public class %s implements EntityClassRegister {", factoryShortName).eol().eol();
|
||||
writeMethodOtherClasses();
|
||||
writeMethodEntityClasses(processingContext.getDbEntities(), null);
|
||||
|
||||
|
||||
Reference in new issue
Block a user