question: public static File toFile ( File dstPath , String fullClassName ) { String packageName = getPackageName ( fullClassName ) ; String packagePath = packageName . replaceAll ( "\\." , "/" ) ; File path = new File ( dstPath , packagePath ) ; path . mkdirs ( ) ; if ( ! path . exists ( ) ) throw new RuntimeException ( "Could not create " + path ) ; String fileName = fullClassName . replaceAll ( "\\." , "/" ) ; File file = new File ( dstPath , fileName + ".java" ) ; return file ; }
target:  Converts file reference from file and ensures that the path exists