JBoss VFS 3.1.0.Final-redhat-2

org.jboss.vfs.util
Class AbstractPatternVirtualFileFilter

java.lang.Object
  extended by org.jboss.vfs.util.AbstractPatternVirtualFileFilter
All Implemented Interfaces:
VirtualFileFilter
Direct Known Subclasses:
IncludePatternVirtualFileFilter

public abstract class AbstractPatternVirtualFileFilter
extends Object
implements VirtualFileFilter

Regexp patter filter.

Author:
Ales Justin

Constructor Summary
AbstractPatternVirtualFileFilter(String regexp)
           
 
Method Summary
 boolean accepts(VirtualFile file)
          Match the virtual file
protected abstract  boolean doMatch()
          Should we match the pattern.
protected abstract  String getMatchString(VirtualFile file)
          Extract match string from file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPatternVirtualFileFilter

public AbstractPatternVirtualFileFilter(String regexp)
Method Detail

getMatchString

protected abstract String getMatchString(VirtualFile file)
Extract match string from file.

Parameters:
file - the file
Returns:
extracted match string

doMatch

protected abstract boolean doMatch()
Should we match the pattern.

Returns:
the match flag

accepts

public boolean accepts(VirtualFile file)
Description copied from interface: VirtualFileFilter
Match the virtual file

Specified by:
accepts in interface VirtualFileFilter
Parameters:
file - the virtual file
Returns:
true when it matches

JBoss VFS 3.1.0.Final-redhat-2

Copyright © 2012 JBoss, A division of Red Hat, Inc. All Rights Reserved.