Ejemplo n.º 1
0
 private List<ClassSymbol> getTopLevelClasses(List<? extends JCCompilationUnit> units) {
   List<ClassSymbol> classes = List.nil();
   for (JCCompilationUnit unit : units) {
     for (JCTree node : unit.defs) {
       if (node.getTag() == JCTree.CLASSDEF) {
         ClassSymbol sym = ((JCClassDecl) node).sym;
         Assert.checkNonNull(sym);
         classes = classes.prepend(sym);
       }
     }
   }
   return classes.reverse();
 }
Ejemplo n.º 2
0
 /** Is the given tree an enumerator definition? */
 boolean isEnumerator(JCTree t) {
   return t.getTag() == JCTree.VARDEF && (((JCVariableDecl) t).mods.flags & ENUM) != 0;
 }