Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » deployment » scanner » [javadoc | source]
org.jboss.deployment.scanner
public class: DeploymentFilter [javadoc | source]
java.lang.Object
   org.jboss.deployment.scanner.DeploymentFilter

All Implemented Interfaces:
    URLFilter, FileFilter

A simple filter for the URLDeploymentScanner. Three arrays are maintained for checking: a prefix, suffix, and match array. If the filename starts with any of the prefixes, ends with any of the suffixes, or exactly matches any of the matches, then the accepts method will return false. NOTE: the arrays *must* be sorted for the string matching to work, and suffixes use the 'reverseComparator'

Constructor:
 public DeploymentFilter() 
 public DeploymentFilter(String[] matches,
    String[] prefixes,
    String[] suffixes) 
    Create using a custom set of matches, prefixes, and suffixes. If any of these arrays are null, then the corresponding default will be substituted.
Method from org.jboss.deployment.scanner.DeploymentFilter Summary:
accept,   accept,   addPrefix,   addPrefixes,   addSuffix,   addSuffixes,   delPrefix,   delPrefixes,   delSuffix,   delSuffixes,   getMatches,   getPrefixes,   getSuffixes,   setMatches,   setPrefixes,   setSuffixes
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.deployment.scanner.DeploymentFilter Detail:
 public boolean accept(File file) 
    If the filename matches any string in the prefix, suffix, or matches array, return false. Perhaps a bit of overkill, but this method operates in log(n) time, where n is the size of the arrays.
 public boolean accept(URL baseURL,
    String memberName) 
 public  void addPrefix(String prefix) 
 public  void addPrefixes(String[] prefixes) 
 public  void addSuffix(String suffix) 
 public  void addSuffixes(String[] suffixes) 
 public  void delPrefix(String prefix) 
 public  void delPrefixes(String[] prefixes) 
 public  void delSuffix(String suffix) 
 public  void delSuffixes(String[] suffixes) 
 public String[] getMatches() 
 public String[] getPrefixes() 
 public String[] getSuffixes() 
 public  void setMatches(String[] matches) 
 public  void setPrefixes(String[] prefixes) 
 public  void setSuffixes(String[] suffixes)