@Test public void packageExistTest() throws IOException { String strPath = BASE_DIR_PKG + DIR_PATH; File createDir = new File(strPath.replace(PERIOD, SLASH)); createDir.mkdirs(); File createFile = new File(createDir + SLASH + PKG_INFO); createFile.createNewFile(); assertThat(true, is(doesPackageExist(strPath))); createDir.delete(); deleteDirectory(createDir); }
public static boolean doesPackageExist(String pkg) { File pkgDir = new File(getPackageDirPathFromJavaJPackage(pkg)); File pkgWithFile = new File(pkgDir + SLASH + "package-info.java"); return pkgDir.exists() && pkgWithFile.isFile(); }
JavaIdentifierSyntax { public static boolean doesPackageExist(String pkg) { File pkgDir = new File(getPackageDirPathFromJavaJPackage(pkg)); File pkgWithFile = new File(pkgDir + SLASH + "package-info.java"); return pkgDir.exists() && pkgWithFile.isFile(); } }
JavaIdentifierSyntax { public static boolean doesPackageExist(String pkg) { File pkgDir = new File(getPackageDirPathFromJavaJPackage(pkg)); File pkgWithFile = new File(pkgDir + SLASH + "package-info.java"); return pkgDir.exists() && pkgWithFile.isFile(); } private  JavaIdentifierSyntax(); }
JavaIdentifierSyntax { public static boolean doesPackageExist(String pkg) { File pkgDir = new File(getPackageDirPathFromJavaJPackage(pkg)); File pkgWithFile = new File(pkgDir + SLASH + "package-info.java"); return pkgDir.exists() && pkgWithFile.isFile(); } private  JavaIdentifierSyntax(); static String getRootPackage(byte version, String nameSpace, String revision,
                                        YangToJavaNamingConflictUtil conflictResolver); static String getEnumJavaAttribute(String name); static void createPackage(YangNode yangNode); static boolean doesPackageExist(String pkg); }
JavaIdentifierSyntax { public static boolean doesPackageExist(String pkg) { File pkgDir = new File(getPackageDirPathFromJavaJPackage(pkg)); File pkgWithFile = new File(pkgDir + SLASH + "package-info.java"); return pkgDir.exists() && pkgWithFile.isFile(); } private  JavaIdentifierSyntax(); static String getRootPackage(byte version, String nameSpace, String revision,
                                        YangToJavaNamingConflictUtil conflictResolver); static String getEnumJavaAttribute(String name); static void createPackage(YangNode yangNode); static boolean doesPackageExist(String pkg);  }