src/main/java/org/progressify/spring/PWAProcessor.java
@Override
    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {

        log.info("\n\n---- PWAProcessor start processing this round ----");
        if (annotations.isEmpty()) {
            log.info("---- PWAProcessor found no annotations to process. Exiting ! ----\n\n");
            return true;
        }

        List<Result> results = new ArrayList<Result>();

        // Enumerate all the supported annotations found in the source code
        // and process each annotation
        // One entry per annotation type not occurence ie. each annotation type can
        // have multiple occurences in the source code
        for (final TypeElement annotation : annotations) {
            // Process each elements annotated with this annotation
            
            for (final Element element : roundEnv.getElementsAnnotatedWith(annotation)) {
                BaseProcessor processor = ProcessorFactory.getProcessor(annotation.toString());
                Result result = processor.process(annotation, element);
                if(result != null){
                    results.add(result);
                }
                
            }
        }

        build(results);

        log.info("---- PWAProcessor end processing this round ----\n\n");
        return true;
    }
/*
     * annotations return all the annotations found in this code base. To find the
     * exact occurence of each annotation, query the roundEnv
     */
annotations return all the annotations found in this code base. To find the
exact occurence of each annotation, query the roundEnv
annotations return all the annotations found in this code base . To find the exact occurence of each annotation query the roundEnv
@Override
    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
        log.info("\n\n---- PWAProcessor start processing this round ----");
        if (annotations.isEmpty()) {
            log.info("---- PWAProcessor found no annotations to process. Exiting ! ----\n\n");
            return true;
        }
        List<Result> results = new ArrayList<Result>();
        for (final TypeElement annotation : annotations) {
            for (final Element element : roundEnv.getElementsAnnotatedWith(annotation)) {
                BaseProcessor processor = ProcessorFactory.getProcessor(annotation.toString());
                Result result = processor.process(annotation, element);
                if(result != null){
                    results.add(result);
                }
            }
        }
        build(results);
        log.info("---- PWAProcessor end processing this round ----\n\n");
        return true;
    }
@ Override public boolean process ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { log . info ( "\n\n---- PWAProcessor start processing this round ----" ) ; if ( annotations . isEmpty ( ) ) { log . info ( "---- PWAProcessor found no annotations to process. Exiting ! ----\n\n" ) ; return true ; } List < Result > results = new ArrayList < Result > ( ) ; for ( final TypeElement annotation : annotations ) { for ( final Element element : roundEnv . getElementsAnnotatedWith ( annotation ) ) { BaseProcessor processor = ProcessorFactory . getProcessor ( annotation . toString ( ) ) ; Result result = processor . process ( annotation , element ) ; if ( result != null ) { results . add ( result ) ; } } } build ( results ) ; log . info ( "---- PWAProcessor end processing this round ----\n\n" ) ; return true ; }
annotations return all the annotations found in this code base.
annotations return all the annotations found in this code base .
// Enumerate all the supported annotations found in the source code // and process each annotation // One entry per annotation type not occurence ie. each annotation type can // have multiple occurences in the source code // Process each elements annotated with this annotation