langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java
changeset 868 d0f233085cbb
parent 10 06bc494ca11e
child 1264 076a3cde30d5
equal deleted inserted replaced
867:1dff24b5f407 868:d0f233085cbb
    51 
    51 
    52     /**
    52     /**
    53      * Map package names onto Extern Item objects.
    53      * Map package names onto Extern Item objects.
    54      * Lazily initialized.
    54      * Lazily initialized.
    55      */
    55      */
    56     private Map packageToItemMap;
    56     private Map<String,Item> packageToItemMap;
    57 
    57 
    58     /**
    58     /**
    59      * The global configuration information for this run.
    59      * The global configuration information for this run.
    60      */
    60      */
    61     private final Configuration configuration;
    61     private final Configuration configuration;
    99         Item(String packageName, String path, boolean relative) {
    99         Item(String packageName, String path, boolean relative) {
   100             this.packageName = packageName;
   100             this.packageName = packageName;
   101             this.path = path;
   101             this.path = path;
   102             this.relative = relative;
   102             this.relative = relative;
   103             if (packageToItemMap == null) {
   103             if (packageToItemMap == null) {
   104                 packageToItemMap = new HashMap();
   104                 packageToItemMap = new HashMap<String,Item>();
   105             }
   105             }
   106             if (!packageToItemMap.containsKey(packageName)) { // save the previous
   106             if (!packageToItemMap.containsKey(packageName)) { // save the previous
   107                 packageToItemMap.put(packageName, this);        // mapped location
   107                 packageToItemMap.put(packageName, this);        // mapped location
   108             }
   108             }
   109         }
   109         }
   183      */
   183      */
   184     private Item findPackageItem(String pkgName) {
   184     private Item findPackageItem(String pkgName) {
   185         if (packageToItemMap == null) {
   185         if (packageToItemMap == null) {
   186             return null;
   186             return null;
   187         }
   187         }
   188         return (Item)packageToItemMap.get(pkgName);
   188         return packageToItemMap.get(pkgName);
   189     }
   189     }
   190 
   190 
   191     /**
   191     /**
   192      * Adjusts the end file separator if it is missing from the URL or the
   192      * Adjusts the end file separator if it is missing from the URL or the
   193      * directory path and depending upon the URL or file path, fetch or
   193      * directory path and depending upon the URL or file path, fetch or