congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PathMatcher.match
Code IndexAdd Tabnine to your IDE (free)

How to use
match
method
in
leap.lang.path.PathMatcher

Best Java code snippets using leap.lang.path.PathMatcher.match (Showing top 9 results out of 315)

origin: org.leapframework/leap-core

protected boolean matchPatterns(String path){
  for(int i=0;i<patterns.length;i++){
    if(patternMatcher.match(patterns[i], path)){
      return true;
    }
  }
  return false;
}

origin: org.leapframework/leap-lang

if (getPathMatcher().match(fullPattern, currPath)) {
  result.add(content);
origin: org.leapframework/leap-core

  @Override
  public boolean matches(RequestBase request) {
    String path = request.getPath(ignoreCase);
    return isPattern ? matcher.match(pattern, path) : pattern.equals(path);
  }
}
origin: org.leapframework/leap-lang

public void visit(Object vfsResource) {
  String relativePath = VfsUtils.getPath(vfsResource).substring(this.rootPath.length());
  if (this.pathMatcher.match(this.subPattern,relativePath)) {
    this.resources.add(new VfsResource(vfsResource));
  }
}
origin: org.leapframework/leap-lang

@Override
@SuppressWarnings("unchecked")
public ServletResource[] scan(String subPattern) {
  Args.notEmpty(subPattern,"subPattern");
  
  Set<String> subPaths = this.servletContext.getResourcePaths(this.path);
  
  List<SimpleServletResource> resources = new ArrayList<>();
  
  PathMatcher matcher = Resources.getPathMatcher();
  
  for(String subPath : subPaths){
    if(matcher.match(subPattern, subPath)){
      resources.add(new SimpleServletResource(servletContext, subPath));
    }
  }
  
  return resources.toArray(new SimpleServletResource[resources.size()]);
}
origin: org.leapframework/leap-lang

@Override
public Resource[] searchClasspaths(String... classpathPatterns) {
  Args.notNull(classpathPatterns,"classpath patterns");
  
  Set<Resource> resources = new LinkedHashSet<Resource>();
  
  for(String classpathPattern : classpathPatterns){
    if(classpathPattern.startsWith("/")){
      classpathPattern = classpathPattern.substring(1);
    }
    
    for(int i=0;i<values.length;i++){
      Resource resource = values[i];
      
      if(null != resource.getClasspath()){
        if(Resources.matcher.match(classpathPattern,resource.getClasspath())){
          resources.add(resource);
        }
      }
    }
  }
  
  return resources.toArray(new Resource[resources.size()]);
}

origin: org.leapframework/leap-lang

@Override
public Resource[] searchUrls(String... locationPatterns) {
  Args.notNull(locationPatterns,"location patterns");
  
  Set<Resource> resources = new LinkedHashSet<Resource>();
  
  for(String locationPattern : locationPatterns){
    try {
      for(int i=0;i<values.length;i++){
        Resource resource = values[i];
        
        if(Resources.matcher.match(locationPattern,resource.getURL().toExternalForm())){
          resources.add(resource);
        }
      }
    } catch (IOException e) {
      throw new NestedIOException(e);
    }
  }
  return resources.toArray(new Resource[resources.size()]);
}

origin: org.leapframework/leap-core

public AppResource[] searchResources(String[] patterns){
  Set<AppResource> set = new TreeSet<>(new ResourceComparator());
  final PathMatcher matcher = Resources.getPathMatcher();
  for(String namedPattern : patterns){
    if(namedPattern.startsWith("/")){
      namedPattern = namedPattern.substring(1);
    }
    for(AppResource r  : sortedResources) {
      if(null != r.getPath()) {
        String path = r.getPath();
        if(matcher.match(namedPattern, path)) {
          set.add(r);
        }
      }
    }
  }
  return set.toArray(new AppResource[0]);
}
origin: org.leapframework/leap-lang

if (entryPath.startsWith(rootEntryPath)) {
  String relativePath = entryPath.substring(rootEntryPath.length());
  if (getPathMatcher().match(subPattern, relativePath)) {
    result.add(rootDirResource.createRelative(relativePath));
leap.lang.pathPathMatchermatch

Popular methods of PathMatcher

  • isPattern
  • matchStart

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • JList (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now