org.eclipse.jetty.webapp
类 JarScanner

java.lang.Object
  继承者 org.eclipse.jetty.util.PatternMatcher
      继承者 org.eclipse.jetty.webapp.JarScanner

public abstract class JarScanner
extends PatternMatcher

JarScannerConfiguration Abstract base class for configurations that want to scan jars in WEB-INF/lib and the classloader hierarchy. Jar name matching based on regexp patterns is provided. Subclasses should implement the processEntry(URL jarUrl, JarEntry entry) method to handle entries in jar files whose names match the supplied pattern.


构造方法摘要
JarScanner()
           
 
方法摘要
 void matched(URI uri)
           
abstract  void processEntry(URI jarUri, JarEntry entry)
           
 void scan(Pattern pattern, ClassLoader loader, boolean isNullInclusive, boolean visitParent)
          Find jar names from the classloader matching a pattern.
 void scan(Pattern pattern, URI[] uris, boolean isNullInclusive)
          Find jar names from the provided list matching a pattern.
 
从类 org.eclipse.jetty.util.PatternMatcher 继承的方法
match, matchPatterns
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

JarScanner

public JarScanner()
方法详细信息

processEntry

public abstract void processEntry(URI jarUri,
                                  JarEntry entry)

scan

public void scan(Pattern pattern,
                 URI[] uris,
                 boolean isNullInclusive)
          throws Exception
Find jar names from the provided list matching a pattern. If the pattern is null and isNullInclusive is true, then all jar names will match. A pattern is a set of acceptable jar names. Each acceptable jar name is a regex. Each regex can be separated by either a "," or a "|". If you use a "|" this or's together the jar name patterns. This means that ordering of the matches is unimportant to you. If instead, you want to match particular jar names, and you want to match them in order, you should separate the regexs with "," instead. Eg "aaa-.\*\.jar|bbb-.\*\.jar" Will iterate over the jar names and match in any order. Eg "aaa-\*\.jar,bbb-.\*\.jar" Will iterate over the jar names, matching all those starting with "aaa-" first, then "bbb-".

参数:
pattern -
uris -
isNullInclusive - if true, an empty pattern means all names match, if false, none match
抛出:
Exception

scan

public void scan(Pattern pattern,
                 ClassLoader loader,
                 boolean isNullInclusive,
                 boolean visitParent)
          throws Exception
Find jar names from the classloader matching a pattern. If the pattern is null and isNullInclusive is true, then all jar names in the classloader will match. A pattern is a set of acceptable jar names. Each acceptable jar name is a regex. Each regex can be separated by either a "," or a "|". If you use a "|" this or's together the jar name patterns. This means that ordering of the matches is unimportant to you. If instead, you want to match particular jar names, and you want to match them in order, you should separate the regexs with "," instead. Eg "aaa-.\*\.jar|bbb-.\*\.jar" Will iterate over the jar names in the classloader and match in any order. Eg "aaa-\*\.jar,bbb-.\*\.jar" Will iterate over the jar names in the classloader, matching all those starting with "aaa-" first, then "bbb-". If visitParent is true, then the pattern is applied to the parent loader hierarchy. If false, it is only applied to the classloader passed in.

参数:
pattern -
loader -
isNullInclusive -
visitParent -
抛出:
Exception

matched

public void matched(URI uri)
             throws Exception
指定者:
PatternMatcher 中的 matched
抛出:
Exception


Copyright © 2013. All Rights Reserved.