basic code for ObjectInfo configs

This commit is contained in:
UnrealValentin
2021-04-12 00:46:54 +02:00
parent 93adc47713
commit c1e2dc1eeb
6 changed files with 53 additions and 0 deletions

View File

@@ -17,6 +17,8 @@ repositories {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation 'com.google.code.gson:gson:2.8.6'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}

View File

@@ -0,0 +1,12 @@
package org.hmcore.registration.config;
public class ModuleInfo {
public final String moduleName;
public final ObjectInfoData[] objects;
public ModuleInfo(String moduleName, ObjectInfoData[] objects) {
this.moduleName = moduleName;
this.objects = objects;
}
}

View File

@@ -0,0 +1,10 @@
package org.hmcore.registration.config;
public class ObjectInfoConfig {
public final ModuleInfo[] modules;
public ObjectInfoConfig(ModuleInfo[] modules) {
this.modules = modules;
}
}

View File

@@ -0,0 +1,11 @@
package org.hmcore.registration.config;
import org.hmcore.modules.Module;
public class ObjectInfoConfigHandler {
public static String generateFreshJSON(Module<?,?>[] modules) {
}
}

View File

@@ -0,0 +1,14 @@
package org.hmcore.registration.config;
import org.jetbrains.annotations.Nullable;
public class ObjectInfoData {
public final String objectName;
public final String objectInfoChoosen;
public ObjectInfoData(String objectName, @Nullable String objectInfoChoosen) {
this.objectName = objectName;
this.objectInfoChoosen = objectInfoChoosen == null ? "default" : objectInfoChoosen;
}
}

View File

@@ -0,0 +1,4 @@
/**
* Classes used for registration purposes. Internal stuff!
*/
package org.hmcore.registration;