< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java

Print this page
rev 48841 : imported patch 8187950


 959             for (Symbol sym : klass.members().getSymbols(NON_RECURSIVE)) {
 960                 if (sym != null && sym.kind == Kind.TYP) {
 961                     ClassSymbol s = (ClassSymbol)sym;
 962                     addAllClasses(list, s, filtered);
 963                 }
 964             }
 965         } catch (CompletionFailure e) {
 966             if (e.getMessage() != null)
 967                 messager.printWarning(e.getMessage());
 968             else
 969                 messager.printWarningUsingKey("main.unexpected.exception", e);
 970         }
 971     }
 972 
 973     /**
 974      * Returns a list of all classes contained in this package, including
 975      * member classes of those classes, and their member classes, etc.
 976      */
 977     private void addAllClasses(Collection<TypeElement> list, PackageElement pkg) {
 978         boolean filtered = true;
 979         PackageSymbol sym = (PackageSymbol)pkg;
 980         for (Symbol isym : sym.members().getSymbols(NON_RECURSIVE)) {
 981             addAllClasses(list, (TypeElement)isym, filtered);
 982         }
 983     }
 984 
 985     private boolean isTypeElementSelected(TypeElement te) {
 986         return (xclasses || toolEnv.getFileKind(te) == SOURCE) && isSelected(te);
 987     }
 988 
 989     SimpleElementVisitor9<Boolean, Void> visibleElementVisitor = null;
 990     /**
 991      * Returns true if the element is selected, by applying
 992      * the access filter checks. Special treatment is applied to
 993      * types, for a top level type the access filter applies completely,
 994      * however if is a nested type then it is allowed either  if
 995      * the enclosing is a static or the enclosing is also selected.
 996      *
 997      * @param e the element to be checked
 998      * @return true if the element is visible
 999      */
1000     public boolean isSelected(Element e) {




 959             for (Symbol sym : klass.members().getSymbols(NON_RECURSIVE)) {
 960                 if (sym != null && sym.kind == Kind.TYP) {
 961                     ClassSymbol s = (ClassSymbol)sym;
 962                     addAllClasses(list, s, filtered);
 963                 }
 964             }
 965         } catch (CompletionFailure e) {
 966             if (e.getMessage() != null)
 967                 messager.printWarning(e.getMessage());
 968             else
 969                 messager.printWarningUsingKey("main.unexpected.exception", e);
 970         }
 971     }
 972 
 973     /**
 974      * Returns a list of all classes contained in this package, including
 975      * member classes of those classes, and their member classes, etc.
 976      */
 977     private void addAllClasses(Collection<TypeElement> list, PackageElement pkg) {
 978         boolean filtered = true;
 979         for (Element isym : pkg.getEnclosedElements()) {

 980             addAllClasses(list, (TypeElement)isym, filtered);
 981         }
 982     }
 983 
 984     private boolean isTypeElementSelected(TypeElement te) {
 985         return (xclasses || toolEnv.getFileKind(te) == SOURCE) && isSelected(te);
 986     }
 987 
 988     SimpleElementVisitor9<Boolean, Void> visibleElementVisitor = null;
 989     /**
 990      * Returns true if the element is selected, by applying
 991      * the access filter checks. Special treatment is applied to
 992      * types, for a top level type the access filter applies completely,
 993      * however if is a nested type then it is allowed either  if
 994      * the enclosing is a static or the enclosing is also selected.
 995      *
 996      * @param e the element to be checked
 997      * @return true if the element is visible
 998      */
 999     public boolean isSelected(Element e) {


< prev index next >