Package org.atmosphere.util.annotation

Examples of org.atmosphere.util.annotation.AnnotationDetector

Similar projects / libraries:

All above mentioned projects make use of a byte code manipulation library (like BCEL, ASM or Javassist). @author Ronald K. Muller @since annotation-detector 3.0.0


                        logger.warn("Could not load discovered class", e);
                    }
                }

            };
            detector = new AnnotationDetector(reporter);
            return this;
        }
View Full Code Here


        return this;
    }

    private void scanForAnnotation(AtmosphereFramework f) {
        List<String> packages = f.customAnnotationPackages();
        AnnotationDetector detector = new AnnotationDetector(atmosphereReporter);
        try {
            if (packages.size() > 0) {
                for (String p : packages) {
                    logger.trace("Package {} scanned for @AtmosphereAnnotation", p);
                    detector.detect(p);
                }
            }

            // Now look for application defined annotation
            String path = IOUtils.realPath(f.getServletContext(), f.getHandlersPath());
            if (path != null) {
                detector.detect(new File(path));
            }

            // JBoss|vfs with APR issue, or any strange containers may fail. This is a hack for them.
            // https://github.com/Atmosphere/atmosphere/issues/1292
            if (!coreAnnotationsFound.get()) {
                fallbackToManualAnnotatedClasses(getClass(), f, handler);
            }
        } catch (IOException e) {
            logger.warn("Unable to scan annotation", e);
        } finally {
            detector.destroy();
        }
    }
View Full Code Here

TOP

Related Classes of org.atmosphere.util.annotation.AnnotationDetector

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.