Class CodegenStringUtil


  • public class CodegenStringUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean blockHasComment​(com.github.javaparser.ast.stmt.BlockStmt block, java.lang.String comment)  
      static java.lang.String escapeIdentifier​(java.lang.String partOfIdentifier)
      Escape for identifier part (not beginning) Similar to drools-model's StringUtil
      static com.github.javaparser.ast.body.MethodDeclaration findMethodTemplate​(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration alphaNodeCreationClass, java.lang.String methodName)  
      static com.github.javaparser.ast.CompilationUnit parseJavaClassTemplateFromResources​(java.lang.Class<?> resourceClass, java.lang.String templateName)  
      static void replaceIntegerLiteralExprWith​(com.github.javaparser.ast.Node source, int oldValue, int newValue)  
      static void replaceSimpleNameWith​(com.github.javaparser.ast.Node source, java.lang.String oldName, java.lang.String newName)  
      static void replaceStringLiteralExprWith​(com.github.javaparser.ast.Node source, java.lang.String oldName, java.lang.String newName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CodegenStringUtil

        public CodegenStringUtil()
    • Method Detail

      • escapeIdentifier

        public static java.lang.String escapeIdentifier​(java.lang.String partOfIdentifier)
        Escape for identifier part (not beginning) Similar to drools-model's StringUtil
      • replaceSimpleNameWith

        public static void replaceSimpleNameWith​(com.github.javaparser.ast.Node source,
                                                 java.lang.String oldName,
                                                 java.lang.String newName)
      • replaceStringLiteralExprWith

        public static void replaceStringLiteralExprWith​(com.github.javaparser.ast.Node source,
                                                        java.lang.String oldName,
                                                        java.lang.String newName)
      • replaceIntegerLiteralExprWith

        public static void replaceIntegerLiteralExprWith​(com.github.javaparser.ast.Node source,
                                                         int oldValue,
                                                         int newValue)
      • blockHasComment

        public static boolean blockHasComment​(com.github.javaparser.ast.stmt.BlockStmt block,
                                              java.lang.String comment)
      • parseJavaClassTemplateFromResources

        public static com.github.javaparser.ast.CompilationUnit parseJavaClassTemplateFromResources​(java.lang.Class<?> resourceClass,
                                                                                                    java.lang.String templateName)
      • findMethodTemplate

        public static com.github.javaparser.ast.body.MethodDeclaration findMethodTemplate​(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration alphaNodeCreationClass,
                                                                                          java.lang.String methodName)