예제 #1
0
 @Override
 public void visit(Tree.ClassOrInterface that) {
   if (that.getDeclarationModel() == declaration) {
     declare();
     specify();
   }
   super.visit(that);
 }
예제 #2
0
 /**
  * Determines whether the given Class def should have a {@code main()} method generated. I.e. it's
  * a concrete top level Class without initializer parameters
  *
  * @param def
  */
 public static boolean generateMain(Tree.ClassOrInterface def) {
   return def instanceof Tree.AnyClass
       && Decl.isToplevel(def)
       && !Decl.isAbstract(def)
       && ((Class) def.getDeclarationModel()).getParameterList().getParameters().isEmpty();
 }
 public static boolean isAnnotationClass(Tree.ClassOrInterface def) {
   return isAnnotationClass(def.getDeclarationModel());
 }