src/share/classes/com/sun/tools/javadoc/JavadocTool.java

Print this page




 402                 if (!Character.isJavaIdentifierPart(cp))
 403                     return false;
 404             }
 405         } else {
 406             if (!Character.isJavaIdentifierStart(s.charAt(0)))
 407                 return false;
 408             for (int j=1; j<s.length(); j++)
 409                 if (!Character.isJavaIdentifierPart(s.charAt(j)))
 410                     return false;
 411         }
 412         return true;
 413     }
 414 
 415     /**
 416      * From a list of top level trees, return the list of contained class definitions
 417      */
 418     List<JCClassDecl> listClasses(List<JCCompilationUnit> trees) {
 419         ListBuffer<JCClassDecl> result = new ListBuffer<JCClassDecl>();
 420         for (JCCompilationUnit t : trees) {
 421             for (JCTree def : t.defs) {
 422                 if (def.getTag() == JCTree.CLASSDEF)
 423                     result.append((JCClassDecl)def);
 424             }
 425         }
 426         return result.toList();
 427     }
 428 
 429 }


 402                 if (!Character.isJavaIdentifierPart(cp))
 403                     return false;
 404             }
 405         } else {
 406             if (!Character.isJavaIdentifierStart(s.charAt(0)))
 407                 return false;
 408             for (int j=1; j<s.length(); j++)
 409                 if (!Character.isJavaIdentifierPart(s.charAt(j)))
 410                     return false;
 411         }
 412         return true;
 413     }
 414 
 415     /**
 416      * From a list of top level trees, return the list of contained class definitions
 417      */
 418     List<JCClassDecl> listClasses(List<JCCompilationUnit> trees) {
 419         ListBuffer<JCClassDecl> result = new ListBuffer<JCClassDecl>();
 420         for (JCCompilationUnit t : trees) {
 421             for (JCTree def : t.defs) {
 422                 if (def.hasTag(JCTree.Tag.CLASSDEF))
 423                     result.append((JCClassDecl)def);
 424             }
 425         }
 426         return result.toList();
 427     }
 428 
 429 }