Examples of scanArchives()


Examples of org.scannotation.AnnotationDB.scanArchives()

                for (URL url : urls) {
                    logger.fine(url.toString());
                }
            }
            AnnotationDB annotationDB = new AnnotationDB();
            annotationDB.scanArchives(urls);
            entities = annotationDB.getAnnotationIndex().get(Entity.class.getName());
            if (entities != null) {
                for (String entity : entities) {
                    initEntity(entity);
                }
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

              toAdd.add(url);
            }
          }
          finalUrls.addAll(toAdd);
      AnnotationDB db = new AnnotationDB();
      db.scanArchives(finalUrls.toArray(new URL[finalUrls.size()]));
      Set<String> entityClasses = db.getAnnotationIndex().get(
          javax.persistence.Entity.class.getName());
      for (String entityClass : entityClasses) {
        Class clazz = Class.forName(entityClass);
        if (UserDefinable.class.isAssignableFrom(clazz))
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

            LOGGER.debug("Final URL is : [" + url.getPath() +
                "] with protocol: [" + url.getProtocol() +
                "] with file: [" + url.getFile() + "]");
          }
          AnnotationDB db = new AnnotationDB();
          db.scanArchives(finalUrls.toArray(new URL[finalUrls.size()]));
          Set<String> entityClasses = db.getAnnotationIndex().get(javax.persistence.Entity.class.getName());
            // Create the SessionFactory
          Configuration ac =  new Configuration();
          Properties properties = XMLPersistenceUtil.getProperties(persistenceFile, persistenceUnitName);
          ac.setProperties(properties);
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

      System.out.println(url.toString());
        System.out.println("URL is : [" + url.getPath() + "] with protocol: [" + url.getProtocol() + "]");
        System.out.println(url.getFile());
      }
    AnnotationDB db = new AnnotationDB();
      db.scanArchives(urls);
      Set<String> entityClasses = db.getAnnotationIndex().get(javax.persistence.Entity.class.getName());
      System.out.println(entityClasses);
  }
}
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 (FileNotFoundException e) {
    return Collections.emptyMap();
  } 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()

                for (URL url : urls) {
                    logger.fine(url.toString());
                }
            }
            AnnotationDB annotationDB = new AnnotationDB();
            annotationDB.scanArchives(urls);
            entities = annotationDB.getAnnotationIndex().get(Entity.class.getName());
            if (entities != null) {
                for (String entity : entities) {
                    initEntity(entity);
                }
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

         AnnotationDB db = new AnnotationDB();
         String[] ignoredPackages = {"org.jboss.resteasy.plugins", "org.jboss.resteasy.annotations", "org.jboss.resteasy.client", "org.jboss.resteasy.specimpl", "org.jboss.resteasy.core", "org.jboss.resteasy.spi", "org.jboss.resteasy.util", "org.jboss.resteasy.mock", "javax.ws.rs"};
         db.setIgnoredPackages(ignoredPackages);
         try
         {
            if (url != null) db.scanArchives(url);
            db.scanArchives(urls);
            try
            {
               db.crossReferenceImplementedInterfaces();
               db.crossReferenceMetaAnnotations();
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

         String[] ignoredPackages = {"org.jboss.resteasy.plugins", "org.jboss.resteasy.annotations", "org.jboss.resteasy.client", "org.jboss.resteasy.specimpl", "org.jboss.resteasy.core", "org.jboss.resteasy.spi", "org.jboss.resteasy.util", "org.jboss.resteasy.mock", "javax.ws.rs"};
         db.setIgnoredPackages(ignoredPackages);
         try
         {
            if (url != null) db.scanArchives(url);
            db.scanArchives(urls);
            try
            {
               db.crossReferenceImplementedInterfaces();
               db.crossReferenceMetaAnnotations();
            }
View Full Code Here

Examples of org.scannotation.AnnotationDB.scanArchives()

      AnnotationDB db = new AnnotationDB();
      db.setScanClassAnnotations(true);
      db.setScanFieldAnnotations(false);
      db.setScanMethodAnnotations(false);
      db.setScanParameterAnnotations(false);
      db.scanArchives(jarUrl);
      Set<String> commandClasses = db.getAnnotationIndex()
        .get(org.eclim.annotation.Command.class.getName());
      if(commandClasses != null){
        for (String commandClass : commandClasses){
          logger.debug("{}: loading command: {}", name, commandClass);
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.