Class UtilJavaParse


  • public final class UtilJavaParse
    extends java.lang.Object
    Java Source Parsing Utilities NOTE: the approach here is not the best and it may be better to use a parser, line one based on antlr, or using a Java Bytecode parser to look at .class files.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int findEndOfBlock​(int blockStart, java.lang.String javaFile)  
      static java.util.Set<java.lang.String> findEntityUseInBlock​(int blockStart, int blockEnd, java.lang.String javaFile)  
      static java.lang.String findRealPathAndFileForClass​(java.lang.String fullyQualifiedClassName)  
      static java.util.Set<java.lang.String> findServiceCallsInBlock​(int blockStart, int blockEnd, java.lang.String javaFile)  
      static int findServiceMethodBlockStart​(java.lang.String methodName, java.lang.String javaFile)  
      static java.lang.String stripComments​(java.lang.String javaFile)  
      • Methods inherited from class java.lang.Object

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

      • findRealPathAndFileForClass

        public static java.lang.String findRealPathAndFileForClass​(java.lang.String fullyQualifiedClassName)
      • findServiceMethodBlockStart

        public static int findServiceMethodBlockStart​(java.lang.String methodName,
                                                      java.lang.String javaFile)
      • findEndOfBlock

        public static int findEndOfBlock​(int blockStart,
                                         java.lang.String javaFile)
      • findServiceCallsInBlock

        public static java.util.Set<java.lang.String> findServiceCallsInBlock​(int blockStart,
                                                                              int blockEnd,
                                                                              java.lang.String javaFile)
      • findEntityUseInBlock

        public static java.util.Set<java.lang.String> findEntityUseInBlock​(int blockStart,
                                                                           int blockEnd,
                                                                           java.lang.String javaFile)
      • stripComments

        public static java.lang.String stripComments​(java.lang.String javaFile)