[FEAT] continue integration

This commit is contained in:
Edouard DUPIN 2024-05-17 19:17:34 +02:00
parent 592243ddc6
commit b64825eaba
2 changed files with 27 additions and 3 deletions

View File

@ -1,5 +1,23 @@
package org.kar.archidata.externalRestApi;
import java.util.ArrayList;
import java.util.List;
import org.kar.archidata.externalRestApi.model.ApiGroupModel;
import org.kar.archidata.externalRestApi.model.ClassModel;
import org.kar.archidata.externalRestApi.model.ModelGroup;
public class AnalyzeApi {
public List<ApiGroupModel> apiModels = new ArrayList<>();
public List<ClassModel> classModels = new ArrayList<>();
public void createApi(final List<Class<?>> classs) throws Exception {
final ModelGroup previousModel = new ModelGroup(this.classModels);
for (final Class<?> clazz : classs) {
final ApiGroupModel parsed = new ApiGroupModel(clazz, previousModel);
this.apiModels.add(parsed);
}
}
}

View File

@ -4,8 +4,14 @@ import java.util.ArrayList;
import java.util.List;
public class ModelGroup {
public final List<ClassModel> previousModel = new ArrayList<>();
public List<ClassModel> previousModel = new ArrayList<>();
public ModelGroup() {}
public ModelGroup(final List<ClassModel> models) {
this.previousModel = models;
}
public ClassModel add(final Class<?> clazz) {
for (final ClassModel value : this.previousModel) {
if (value.isCompatible(clazz)) {
@ -16,7 +22,7 @@ public class ModelGroup {
final ClassModel elem = new ClassEnumModel(clazz);
}
// create new model:
return null;
}
}