/** * get rootPath from locationPattern. * <p> * if "/context/** / *.xml" should get the result "/context/" * </p> * * @param locationPattern locationPattern * @return the RootPath string. */ private static String getRootPath(final String locationPattern) { int rootDirEnd = locationPattern.length(); while (AntPathMatcher.isPattern(locationPattern.substring(0, rootDirEnd))) { rootDirEnd = locationPattern.lastIndexOf('/', rootDirEnd - 2) + 1; } return locationPattern.substring(0, rootDirEnd); }
if (!AntPathMatcher.isPattern(path)) { path = path.replaceAll("\\.", "/") + "/**/*.class";
/** * get rootPath from locationPattern. * <p> * if "/context/** / *.xml" should get the result "/context/" * </p> * * @param locationPattern locationPattern * @return the RootPath string. */ private static String getRootPath(final String locationPattern) { int rootDirEnd = locationPattern.length(); while (AntPathMatcher.isPattern(locationPattern.substring(0, rootDirEnd))) { rootDirEnd = locationPattern.lastIndexOf('/', rootDirEnd - 2) + 1; } return locationPattern.substring(0, rootDirEnd); }
if (!AntPathMatcher.isPattern(path)) { path = path.replaceAll("\\.", "/") + "/**/*.class";