use of org.kie.workbench.common.services.datamodel.backend.server.builder.projects.ClassFieldInspector.FieldInfo in project kie-wb-common by kiegroup.
the class ClassFieldInspectorTest method buildBean2ExpectedFields.
private Map<String, FieldInfo> buildBean2ExpectedFields() {
Map<String, FieldInfo> result = new HashMap<>();
Annotation annotation2 = new Annotation(Annotation2.class.getName());
annotation2.addParameter("param1", "value3");
annotation2.addParameter("param2", "value4");
Set<Annotation> annotations = new HashSet<>();
annotations.add(annotation2);
result.putAll(buildBean1ExpectedFields(ModelField.FIELD_ORIGIN.INHERITED));
result.put("fieldBean2_1", new FieldInfo(FieldAccessorsAndMutators.BOTH, String.class, String.class, ModelField.FIELD_ORIGIN.DECLARED, new HashSet<>()));
result.put("fieldBean2_2", new FieldInfo(FieldAccessorsAndMutators.BOTH, Object.class, Object.class, ModelField.FIELD_ORIGIN.DECLARED, annotations));
return result;
}
use of org.kie.workbench.common.services.datamodel.backend.server.builder.projects.ClassFieldInspector.FieldInfo in project kie-wb-common by kiegroup.
the class ClassFieldInspectorTest method buildBean1ExpectedFields.
private Map<String, FieldInfo> buildBean1ExpectedFields(ModelField.FIELD_ORIGIN origin) {
Map<String, FieldInfo> result = new HashMap<>();
Annotation annotation1 = new Annotation(Annotation1.class.getName());
Annotation annotation2 = new Annotation(Annotation2.class.getName());
annotation2.addParameter("param1", "value1");
annotation2.addParameter("param2", "value2");
Set<Annotation> annotations = new HashSet<>();
annotations.add(annotation1);
annotations.add(annotation2);
result.put("fieldBean1_1", new FieldInfo(FieldAccessorsAndMutators.BOTH, String.class, String.class, origin, annotations));
result.put("fieldBean1_2", new FieldInfo(FieldAccessorsAndMutators.ACCESSOR, Integer.TYPE, Integer.TYPE, origin, new HashSet<>()));
result.put("fieldBean1_3", new FieldInfo(FieldAccessorsAndMutators.BOTH, Boolean.TYPE, Boolean.TYPE, origin, new HashSet<>()));
result.put("fieldBean1_4", new FieldInfo(FieldAccessorsAndMutators.MUTATOR, Integer.class, Integer.class, origin, new HashSet<>()));
return result;
}
Aggregations