public static void writeUtilClassForHashEqualsToString(final File srcDir, final String pkgName, final String utilClassName) {
        final String utilClassFilePath = srcDir.getAbsolutePath()
                + (N.isNullOrEmpty(pkgName) ? "" : IOUtil.FILE_SEPARATOR + StringUtil.replaceAll(pkgName, ".", IOUtil.FILE_SEPARATOR)) + IOUtil.FILE_SEPARATOR
                + utilClassName + ".java";
        final File utilClassFile = new File(utilClassFilePath);

        if (utilClassFile.exists() == false && IOUtil.createIfNotExists(utilClassFile) == false) {
            throw new RuntimeException("Failed to create new File by path: " + utilClassFilePath);
        }

        if (N.isNullOrEmpty(pkgName)) {
            IOUtil.write(utilClassFile, _N_STRING.replaceFirst("package com.landawn.abacus.util;", "").replaceAll("_N", utilClassName));
        } else {
            IOUtil.write(utilClassFile, _N_STRING.replaceFirst("com.landawn.abacus.util", pkgName).replaceAll("_N", utilClassName));
        }
    }
public static void writeUtilClassForHashEqualsToString ( final File srcDir , final String pkgName , final String utilClassName ) { final String utilClassFilePath = srcDir . getAbsolutePath ( ) + ( N . isNullOrEmpty ( pkgName ) ? "" : IOUtil . FILE_SEPARATOR + StringUtil . replaceAll ( pkgName , "." , IOUtil . FILE_SEPARATOR ) ) + IOUtil . FILE_SEPARATOR + utilClassName + ".java" ; final File utilClassFile = new File ( utilClassFilePath ) ; if ( utilClassFile . exists ( ) == false && IOUtil . createIfNotExists ( utilClassFile ) == false ) { throw new RuntimeException ( "Failed to create new File by path: " + utilClassFilePath ) ; } if ( N . isNullOrEmpty ( pkgName ) ) { IOUtil . write ( utilClassFile , _N_STRING . replaceFirst ( "package com.landawn.abacus.util;" , "" ) . replaceAll ( "_N" , utilClassName ) ) ; } else { IOUtil . write ( utilClassFile , _N_STRING . replaceFirst ( "com.landawn.abacus.util" , pkgName ) . replaceAll ( "_N" , utilClassName ) ) ; } }
@param srcDir
@param pkgName
@param utilClassName