com.sun.jini.tool
Class JarWrapper.PreferredListReader

java.lang.Object
  extended by com.sun.jini.tool.JarWrapper.PreferredListReader
Enclosing class:
JarWrapper

private static class JarWrapper.PreferredListReader
extends Object

Parses preferred lists.


Field Summary
private  boolean defaultPref
           
private static Pattern headerPattern
           
private static Pattern namePattern
           
private  Map namePrefs
           
private  Map packagePrefs
           
private static Pattern preferredPattern
           
private  Map subtreePrefs
           
private static Pattern versionPattern
           
 
Constructor Summary
JarWrapper.PreferredListReader(JarFile jar)
          Parses the given JAR file's preferred list, if any.
 
Method Summary
(package private)  boolean isPreferred(String entry)
          Returns true if list prefers given entry, or false otherwise.
private static String nextNonBlankLine(BufferedReader reader)
          Returns next non-blank, non-comment line, or null if end of file has been reached.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

headerPattern

private static final Pattern headerPattern

versionPattern

private static final Pattern versionPattern

namePattern

private static final Pattern namePattern

preferredPattern

private static final Pattern preferredPattern

defaultPref

private final boolean defaultPref

namePrefs

private final Map namePrefs

packagePrefs

private final Map packagePrefs

subtreePrefs

private final Map subtreePrefs
Constructor Detail

JarWrapper.PreferredListReader

JarWrapper.PreferredListReader(JarFile jar)
                         throws IOException
Parses the given JAR file's preferred list, if any.

Throws:
IOException
Method Detail

isPreferred

boolean isPreferred(String entry)
Returns true if list prefers given entry, or false otherwise.


nextNonBlankLine

private static String nextNonBlankLine(BufferedReader reader)
                                throws IOException
Returns next non-blank, non-comment line, or null if end of file has been reached.

Throws:
IOException


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.