Search in sources :

Example 1 with JavaEnumImpl

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);
}
Also used : JavaEnumImpl(org.kie.workbench.common.services.datamodeller.core.impl.JavaEnumImpl) JavaEnum(org.kie.workbench.common.services.datamodeller.core.JavaEnum) Visibility(org.kie.workbench.common.services.datamodeller.core.Visibility)

Example 2 with JavaEnumImpl

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;
}
Also used : JavaEnumImpl(org.kie.workbench.common.services.datamodeller.core.impl.JavaEnumImpl) JavaEnum(org.kie.workbench.common.services.datamodeller.core.JavaEnum) ArrayList(java.util.ArrayList)

Example 3 with JavaEnumImpl

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));
}
Also used : JavaEnumImpl(org.kie.workbench.common.services.datamodeller.core.impl.JavaEnumImpl) Visibility(org.kie.workbench.common.services.datamodeller.core.Visibility)

Aggregations

JavaEnumImpl (org.kie.workbench.common.services.datamodeller.core.impl.JavaEnumImpl)3 JavaEnum (org.kie.workbench.common.services.datamodeller.core.JavaEnum)2 Visibility (org.kie.workbench.common.services.datamodeller.core.Visibility)2 ArrayList (java.util.ArrayList)1