Class JavaUtils


  • public class JavaUtils
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String JAVA_FILE_EXT
      Constant .java.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JavaUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.File directory​(java.io.File srcDirectory, java.lang.String javaPackage)
      Returns the path to associated with a Java package.
      static java.io.File file​(java.io.File srcDirectory, java.lang.String javaPackage, java.lang.String className)
      Returns the Java source file associated with a class name.
      static java.lang.String packageToPath​(java.lang.String javaPackage)  
      • Methods inherited from class java.lang.Object

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

      • JAVA_FILE_EXT

        private static final java.lang.String JAVA_FILE_EXT
        Constant .java.
        See Also:
        Constant Field Values
    • Constructor Detail

      • JavaUtils

        private JavaUtils()
    • Method Detail

      • packageToPath

        public static java.lang.String packageToPath​(java.lang.String javaPackage)
      • file

        public static java.io.File file​(java.io.File srcDirectory,
                                        java.lang.String javaPackage,
                                        java.lang.String className)
        Returns the Java source file associated with a class name.
        Parameters:
        srcDirectory - The root source directory, e.g. /src.
        javaPackage - The java package, e.g. foo.bar.
        className - The Java class name, e.g. MyLexer.
        Returns:
        source file associated with the class name.
      • directory

        public static java.io.File directory​(java.io.File srcDirectory,
                                             java.lang.String javaPackage)
        Returns the path to associated with a Java package.
        Parameters:
        srcDirectory - The root source directory, e.g. /src.
        javaPackage - The java package, e.g. foo.bar.