public boolean accept(File pathname) { URI relativeURI = this.basedir.toURI().relativize(pathname.toURI()); String relativePath = relativeURI.toString(); return this.matcher.match(this.pattern, relativePath); } }
public boolean match(String pattern, String path) { return doMatch(pattern, path, true); }
AntPatternMatcher matcher = new AntPatternMatcher(); matcher.setPathSeparator("."); for (APIImport apiImport : this.enunciate.getConfig().getAPIImports()) { String pattern = apiImport.getPattern(); classes2sources.put(foundEntry.getKey(), apiImport.isSeekSource() ? foundEntry.getValue() : null); else if (matcher.isPattern(pattern) && matcher.match(pattern, foundEntry.getKey())) { this.enunciate.debug("Class %s will be imported because it matches pattern %s.", foundEntry.getKey(), pattern); imported |= !classes2sources.containsKey(foundEntry.getKey());
AntPatternMatcher matcher = new AntPatternMatcher(); matcher.setPathSeparator("."); if (!config.getApiIncludePatterns().isEmpty()) { Iterator<TypeDeclaration> typeDeclarationIt = typeDeclarations.iterator(); if (matcher.match(includePattern, typeDeclaration.getQualifiedName())) { include = true; debug("%s matches include pattern %s.", typeDeclaration.getQualifiedName(), includePattern);
AntPatternMatcher matcher = new AntPatternMatcher(); matcher.setPathSeparator("."); for (APIImport apiImport : this.config.getAPIImports()) { if (!matcher.isPattern(apiImport.getPattern()) && !classes2sources.containsKey(apiImport.getPattern())) { warn("Class %s was explicitly imported, but it was not found on the classpath. We'll try to import it anyway.", apiImport.getPattern()); classes2sources.put(apiImport.getPattern(), null);
AntPatternMatcher matcher = new AntPatternMatcher(); matcher.setPathSeparator("."); for (WebFault webFault : allFaults.values()) { if (useServerSide(webFault, matcher)) {
AntPatternMatcher matcher = new AntPatternMatcher(); for (CopyResources copyResource : getWebAppConfig().getCopyResources()) { String pattern = copyResource.getPattern(); if (!matcher.isPattern(pattern)) { warn("'%s' is not a valid pattern. Resources NOT copied!", pattern); continue;
break; if (!matchStrings(patDir, pathDirs[pathIdxStart])) { return false; break; if (!matchStrings(patDir, pathDirs[pathIdxEnd])) { return false; String subPat = (String) pattDirs[pattIdxStart + j + 1]; String subStr = (String) pathDirs[pathIdxStart + i + j]; if (!matchStrings(subPat, subStr)) { continue strLoop;
AntPatternMatcher pathMatcher = new AntPatternMatcher(); pathMatcher.setPathSeparator(File.separator); List<File> explicitIncludes = new ArrayList<File>(); List<String> includePatterns = new ArrayList<String>(); if (pathMatcher.isPattern(pattern)) { if (pathMatcher.match(includePattern, absolutePath)) { debug("Library '%s' passed the include filter. It matches pattern '%s'.", libFile.getAbsolutePath(), includePattern); includedLibs.add(libFile); if (pattern != null) { pattern = pattern.replace('/', File.separatorChar); if (pathMatcher.isPattern(pattern)) { String absolutePath = toBeIncluded.getAbsolutePath(); if (absolutePath.startsWith(File.separator)) { if (pathMatcher.match(pattern, absolutePath)) { exclude = true; debug("%s was excluded because it matches pattern '%s'", toBeIncluded, pattern);
AntPatternMatcher matcher = new AntPatternMatcher(); matcher.setPathSeparator("."); if (!config.getApiExcludePatterns().isEmpty()) { Iterator<TypeDeclaration> typeDeclarationIt = typeDeclarations.iterator(); if (matcher.match(excludePattern, typeDeclaration.getQualifiedName())) { exclude = true; debug("%s matches exclude pattern %s.", typeDeclaration.getQualifiedName(), excludePattern);
/** * Whether to use the server-side declaration for this declaration. * * @param declaration The declaration. * @param matcher The matcher. * @return Whether to use the server-side declaration for this declaration. */ protected boolean useServerSide(TypeDeclaration declaration, AntPatternMatcher matcher) { boolean useServerSide = false; for (String pattern : serverSideTypesToUse) { if (matcher.match(pattern, declaration.getQualifiedName())) { useServerSide = true; break; } } return useServerSide; }