Examples of scanArchives()


Examples of net.csdn.common.scan.DefaultScanService.scanArchives()

        public void load() throws Exception {
            final Enhancer enhancer = new MongoEnhancer(settings());
            final List<CtClass> classList = new ArrayList<CtClass>();
            ScanService scanService = new DefaultScanService();
            scanService.setLoader(mongoConfiguration.classLoader);
            scanService.scanArchives(settings().get("application.document"), new ScanService.LoadClassEnhanceCallBack() {

                public Class loaded(DataInputStream classFile) {
                    try {
                        classList.add(enhancer.enhanceThisClass(classFile));
                    } catch (Exception e) {
View Full Code Here

Examples of net.csdn.common.scan.ScanService.scanArchives()

        public void load() throws Exception {
            final Enhancer enhancer = new MongoEnhancer(settings());
            final List<CtClass> classList = new ArrayList<CtClass>();
            ScanService scanService = new DefaultScanService();
            scanService.setLoader(mongoConfiguration.classLoader);
            scanService.scanArchives(settings().get("application.document"), new ScanService.LoadClassEnhanceCallBack() {

                public Class loaded(DataInputStream classFile) {
                    try {
                        classList.add(enhancer.enhanceThisClass(classFile));
                    } catch (Exception e) {
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

         db.setScanFieldAnnotations(false);
         db.setScanMethodAnnotations(false);
         db.setScanParameterAnnotations(false);
         try
         {
            db.scanArchives(urls);
            try
            {
               db.crossReferenceImplementedInterfaces();
               db.crossReferenceMetaAnnotations();
            }
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

    public void execute() throws MojoExecutionException, MojoFailureException {
        try {
            final JSONObject descriptor = new JSONObject();

            final AnnotationDB annotationDb = new AnnotationDB();
            annotationDb.scanArchives(buildOutputDirectory.toURI().toURL());

            final Set<String> annotatedClassNames = new HashSet<String>();
            addAnnotatedClasses(annotationDb, annotatedClassNames, Adaptable.class);
            addAnnotatedClasses(annotationDb, annotatedClassNames, Adaptables.class);
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

         db.setScanFieldAnnotations(false);
         db.setScanMethodAnnotations(false);
         db.setScanParameterAnnotations(false);
         try
         {
            db.scanArchives(urls);
            try
            {
               db.crossReferenceImplementedInterfaces();
               db.crossReferenceMetaAnnotations();
            }
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

         db.setScanFieldAnnotations(false);
         db.setScanMethodAnnotations(false);
         db.setScanParameterAnnotations(false);
         try
         {
            db.scanArchives(urls);
            try
            {
               db.crossReferenceImplementedInterfaces();
               db.crossReferenceMetaAnnotations();
            }
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

  }

  private Map<String, Set<String>> scanWebInfClasses(URL webInfClasses) {
    try {
      AnnotationDB db = createAnnotationDB();
      db.scanArchives(webInfClasses);
      return db.getAnnotationIndex();
    } catch (IOException e) {
      throw new ScannerException("Could not scan WEB-INF/classes", e);
    }
  }
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

  }

  private Map<String, Set<String>> scanWebInfClasses(URL webInfClasses) {
    try {
      AnnotationDB db = createAnnotationDB();
      db.scanArchives(webInfClasses);
      return db.getAnnotationIndex();
    } catch (IOException e) {
      throw new ScannerException("Could not scan WEB-INF/classes", e);
    }
  }
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

          }
          if (!file.startsWith("file:")) {
            file = "file:" + file;
          }

          db.scanArchives(new URL(file));
        } while (urls.hasMoreElements());
      }

      return db.getAnnotationIndex();
    } catch (IOException e) {
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

public class AnnotationTests {
    @Test
    public void findAnnotations() throws IOException {
        URL[] urls = ClasspathUrlFinder.findClassPaths(); // scan java.class.path
        AnnotationDB db = new AnnotationDB();
        db.scanArchives(urls);
        Set<String> entities = db.getAnnotationIndex().get(Entity.class.getName());
        for (String entity : entities) {
            System.out.println("entity=" + entity);
        }
    }
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.