Examples of 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

  • org.atmosphere.util.annotation.AnnotationDetector
    kipedia.org/wiki/Java_class_file">Java class file (Wikipedia) (Gentle Introduction);
  • Class File Format Specification (Java 6 version) and the Java VM Specification (Chapter 4) for the real work.
  • scanning java annotations at runtime.

    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


  • Examples of com.sun.enterprise.deployment.util.AnnotationDetector

        }

        @Override
        protected boolean postHandles(ReadableArchive abstractArchive)
                throws IOException {
            AnnotationDetector detector =
                        new AnnotationDetector(new EjbComponentAnnotationScanner());
            return (!DeploymentUtils.isArchiveOfType(abstractArchive, DOLUtils.warType(), locator)) &&
                    detector.hasAnnotationInArchiveWithNoScanning(abstractArchive);
        }
    View Full Code Here

    Examples of com.sun.enterprise.deployment.util.AnnotationDetector

                    }
                }
            }

            if (unknowns.size() > 0) {
                AnnotationDetector detector =
                        new AnnotationDetector(new EjbComponentAnnotationScanner());
                for (int i = 0; i < unknowns.size(); i++) {
                    File jarFile = new File(unknowns.get(i).getURI().getSchemeSpecificPart());
                    try {
                        if (detector.hasAnnotationInArchive(unknowns.get(i))) {
                            String uri = deriveArchiveUri(appRoot, jarFile, directory);
                            //Section EE.8.4.2.1.d.ii, alas EJB
                            ModuleDescriptor<BundleDescriptor> md = new ModuleDescriptor<BundleDescriptor>();
                            md.setArchiveUri(uri);
                            md.setModuleType(DOLUtils.ejbType());
    View Full Code Here

    Examples of com.sun.enterprise.deployment.util.AnnotationDetector

        protected boolean mainClassContainsPURefcAnnotations(
            ApplicationClientDescriptor acDescr)
                throws MalformedURLException, ClassNotFoundException,
                       IOException, URISyntaxException {
            AnnotationDetector annoDetector =
                        new AnnotationDetector(new AppClientPersistenceDependencyAnnotationScanner());

            //e.g. FROM a.b.Foo or Foo TO a/b/Foo.class or Foo.class
            String mainClassEntryName =
                    acDescr.getMainClassName().replace('.', '/') + ".class";
    View Full Code Here

    Examples of com.sun.enterprise.deployment.util.AnnotationDetector

        protected boolean mainClassContainsPURefcAnnotations(
            ApplicationClientDescriptor acDescr)
                throws MalformedURLException, ClassNotFoundException,
                       IOException, URISyntaxException {
            AnnotationDetector annoDetector =
                        new AnnotationDetector(new AppClientPersistenceDependencyAnnotationScanner());

            //e.g. FROM a.b.Foo or Foo TO a/b/Foo.class or Foo.class
            String mainClassEntryName =
                    acDescr.getMainClassName().replace('.', '/') + ".class";
    View Full Code Here

    Examples of eu.infomas.annotation.AnnotationDetector

            }

            // Scan the classpath for annotations
            Reporter reporter = new Reporter(_annotationClasses);
            try {
                new AnnotationDetector(reporter).detect(_packageNames);
            } catch (IOException e) {
                throw Throwables.propagate(e);
            }

            // Remember the annotated classes, methods and fields for later
    View Full Code Here

    Examples of org.atmosphere.util.annotation.AnnotationDetector

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

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

    Examples of org.atmosphere.util.annotation.AnnotationDetector

            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
    Copyright © 2018 www.massapi.com. 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.