use of org.kie.workbench.common.services.datamodeller.core.impl.JavaEnumImpl in project kie-wb-common by kiegroup.
the class ModuleDataModelOracleUtils method addEnumType.
private static void addEnumType(DataModel dataModel, String factType, ClassMetadata classMetadata) {
String packageName = NamingUtils.extractPackageName(factType);
String className = NamingUtils.extractClassName(factType);
Visibility visibility = DriverUtils.buildVisibility(classMetadata.getModifiers());
JavaEnum javaEnum = new JavaEnumImpl(packageName, className, visibility);
dataModel.addJavaEnum(javaEnum, ObjectSource.DEPENDENCY);
}
use of org.kie.workbench.common.services.datamodeller.core.impl.JavaEnumImpl in project kie-wb-common by kiegroup.
the class ModuleDataModelOracleUtilsTest method createExpectedExternalEnums.
private List<JavaEnum> createExpectedExternalEnums() {
List<JavaEnum> result = new ArrayList<>();
result.add(new JavaEnumImpl(TEST_PACKAGE, "ExternalEnum1", Visibility.PUBLIC));
result.add(new JavaEnumImpl(TEST_PACKAGE, "ExternalEnum2", Visibility.PUBLIC));
return result;
}
use of org.kie.workbench.common.services.datamodeller.core.impl.JavaEnumImpl in project kie-wb-common by kiegroup.
the class JavaRoasterModelDriver method loadFromJavaEnum.
private void loadFromJavaEnum(JavaEnumSource javaEnumSource, Path file, DataModel dataModel, ModelDriverResult result) {
String className = javaEnumSource.getName();
String packageName = javaEnumSource.getPackage();
Visibility visibility = DriverUtils.buildVisibility(javaEnumSource.getVisibility());
JavaEnumImpl javaEnum = new JavaEnumImpl(packageName, className, visibility);
dataModel.addJavaEnum(javaEnum);
result.setClassPath(javaEnum.getClassName(), Paths.convert(file));
}
Aggregations