langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java
changeset 25454 376a52c9540c
parent 22163 3651128c74eb
equal deleted inserted replaced
25453:be80cf0463b3 25454:376a52c9540c
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    48 
    48 
    49     /**
    49     /**
    50      * The global configuration information for this run.
    50      * The global configuration information for this run.
    51      */
    51      */
    52     private final Configuration configuration;
    52     private final Configuration configuration;
       
    53     private final Utils utils;
    53 
    54 
    54     /**
    55     /**
    55      * Constructor
    56      * Constructor
    56      */
    57      */
    57     public MetaKeywords(Configuration configuration) {
    58     public MetaKeywords(Configuration configuration) {
    58         this.configuration = configuration;
    59         this.configuration = configuration;
       
    60         this.utils = configuration.utils;
    59     }
    61     }
    60 
    62 
    61     /**
    63     /**
    62      * Returns an array of strings where each element
    64      * Returns an array of strings where each element
    63      * is a class, method or field name.  This array is
    65      * is a class, method or field name.  This array is
    96     /**
    98     /**
    97      * Get the package keywords.
    99      * Get the package keywords.
    98      */
   100      */
    99     public String[] getMetaKeywords(PackageDoc packageDoc) {
   101     public String[] getMetaKeywords(PackageDoc packageDoc) {
   100         if( configuration.keywords ) {
   102         if( configuration.keywords ) {
   101             String pkgName = Util.getPackageName(packageDoc);
   103             String pkgName = utils.getPackageName(packageDoc);
   102             return new String[] { pkgName + " " + "package" };
   104             return new String[] { pkgName + " " + "package" };
   103         } else {
   105         } else {
   104             return new String[] {};
   106             return new String[] {};
   105         }
   107         }
   106     }
   108     }