Package org.kie.efesto.common.utils
Class JavaParserUtils
- java.lang.Object
-
- org.kie.efesto.common.utils.JavaParserUtils
-
public class JavaParserUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMAIN_CLASS_NOT_FOUND
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.github.javaparser.ast.CompilationUnitgetCompilationUnit(java.lang.String className, java.lang.String packageName, java.lang.String javaTemplate, java.lang.String modelClassName)static java.lang.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 java.lang.String MAIN_CLASS_NOT_FOUND
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCompilationUnit
public static com.github.javaparser.ast.CompilationUnit getCompilationUnit(java.lang.String className, java.lang.String packageName, java.lang.String javaTemplate, java.lang.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 java.lang.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:
-
-