Package org.kie.efesto.common.utils
Class JavaParserUtils
- java.lang.Object
-
- org.kie.efesto.common.utils.JavaParserUtils
-
public class JavaParserUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringMAIN_CLASS_NOT_FOUND
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.github.javaparser.ast.CompilationUnitgetCompilationUnit(String className, String packageName, String javaTemplate, String modelClassName)static StringgetFullClassName(com.github.javaparser.ast.CompilationUnit cu)Return the fully qualified name of the generated class.
-
-
-
Field Detail
-
MAIN_CLASS_NOT_FOUND
public static final String MAIN_CLASS_NOT_FOUND
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCompilationUnit
public static com.github.javaparser.ast.CompilationUnit getCompilationUnit(String className, String packageName, String javaTemplate, String modelClassName)
- Parameters:
className-packageName-javaTemplate- the name of the file to be used as template sourcemodelClassName- the name of the class used in the provided template- Returns:
-
getFullClassName
public static String getFullClassName(com.github.javaparser.ast.CompilationUnit cu)
Return the fully qualified name of the generated class. It throwsKiePMMLExceptionif the package name is missing- Parameters:
cu-- Returns:
-
-