Package net.ftlines.metagen.processor.tree

Examples of net.ftlines.metagen.processor.tree.BeanSpace


    logger.log("");
    logger.log("STARTED ROUND");
    logger.log("");

    BeanSpace beans = new BeanSpace();
    try
    {
      // TODO this should prob delegate to beanspace.add(element);
      // TODO beanspace should check if element is supported and error
      // otherwise
      for (TypeElement annotation : annotations)
      {
        logger.log("Processing annotation: %s", annotation.getQualifiedName());

        for (Element annotated : round.getElementsAnnotatedWith(annotation))
        {
          TypeElement element = null;
          switch (annotated.getKind())
          {
            case CLASS :
            case ENUM :
              element = (TypeElement)annotated;

              logger.log("Processing annotated class/enum: %s", element.getQualifiedName());

              if (accept(element))
              {
                beans.add(element);
              }
              break;
            case FIELD :
            case METHOD :
              element = (TypeElement)annotated.getEnclosingElement();

              logger.log("Processing class/enum: %s derived from annotated element: %s",
                element.getQualifiedName(), annotated.getSimpleName());

              if (accept(element))
              {
                beans.add(element);
              }
              break;
            default :
              logger.log("Ignored element: %s of kind: %s", annotated.getSimpleName(),
                annotated.getKind());
          }
        }
      }

      beans.accept(new PropertyResolvingVisitor(resolvers));
      beans.accept(new TrimmingVisitor());
      // beans.accept(new PrintVisitor());
      beans.accept(new ValidatingVisitor(environment));
      beans.accept(new SuperclassResolvingVisitor());
      beans.accept(new TrimmingVisitor());
      beans.accept(new CodeGeneratingVisitor(environment));


      logger.log("");
      logger.log("ROUND COMPLETED [V3]");
      logger.log("");
View Full Code Here

TOP

Related Classes of net.ftlines.metagen.processor.tree.BeanSpace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.