List of utility methods to do Package Convert To
String | packageToDir(String packages) package To Dir String dir = packages; if (packages != null && packages.length() > 1) { dir = packages.replaceAll("[.]", "/"); return dir; |
String | packageToDirectory(String sDestDir, String sPackage) Return a directory path with the given directory + the given String sPackageDir = sPackage.replace('.', '/'); if (sDestDir.endsWith("/") || sDestDir.endsWith("\\")) { return sDestDir + sPackageDir; } else { return sDestDir + "/" + sPackageDir; |
int | PackageToInt(char pack) get an Char into int depending on the package it represent int iPack; iPack = (int) pack - 65; if (iPack >= 0 && iPack <= 25) return iPack; else return 42; |
String | packageToPath(Class objClass) package To Path String className = objClass.getName(); int lastDotIndex = className.lastIndexOf("."); return (lastDotIndex < 0) ? "" : className.substring(0, lastDotIndex).replace('.', '/'); |
String | packageToPath(final String packageName) Convert a java package name to a path. return packageName.replace('.', '/'); |
String | packageToPath(String basePackage) package To Path return basePackage.replaceAll("\\.", "/") + "/"; |
String | packageToPath(String pkg) package To Path return "src/main/java/" + pkg.replace(".", "/"); |
String | packageToResourcePath(String thePackage) package To Resource Path return thePackage.replaceAll("\\.", "/"); |
String | packageToSrcFilePath(String packageName) package To Src File Path return packageName.replace(".", "/"); |