Package com.opensymphony.xwork2.util.finder

Examples of com.opensymphony.xwork2.util.finder.ClassFinder


                // url set, which can produce spurious warnings for non-action
                // classes that can't be loaded. We pass a package filter that
                // only considers classes that match the action packages
                // specified by the user
                Test<String> classPackageTest = getClassPackageTest();
                ClassFinder finder = new ClassFinder(getClassLoaderInterface(),
                        buildUrlSet().getUrls(), true, this.fileProtocols,
                        classPackageTest);

                Test<ClassFinder.ClassInfo> test = getActionClassTest();
                for (Class<?> clazz : finder.findClasses(test)) {
                    classes.add(clazz);
                }
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled())
View Full Code Here


                // url set, which can produce spurious warnings for non-action
                // classes that can't be loaded. We pass a package filter that
                // only considers classes that match the action packages
                // specified by the user
                Test<String> classPackageTest = getClassPackageTest();
                ClassFinder finder = new ClassFinder(getClassLoaderInterface(),
                        buildUrlSet().getUrls(), true, this.fileProtocols,
                        classPackageTest);

                Test<ClassFinder.ClassInfo> test = getActionClassTest();
                for (Class<?> clazz : finder.findClasses(test)) {
                    classes.add(clazz);
                }
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled())
View Full Code Here

                // classes that can't be loaded. We pass a package filter that
                // only considers classes that match the action packages
                // specified by the user
                Test<String> classPackageTest = getClassPackageTest();
                List<URL> urls = readUrls();
                ClassFinder finder = new ClassFinder(getClassLoaderInterface(), urls, EXTRACT_BASE_INTERFACES, fileProtocols, classPackageTest);

                Test<ClassFinder.ClassInfo> test = getActionClassTest();
                for (Class<?> clazz : finder.findClasses(test)) {
                  classes.add(clazz);
                }
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled())
View Full Code Here

                // url set, which can produce spurious warnings for non-action
                // classes that can't be loaded. We pass a package filter that
                // only considers classes that match the action packages
                // specified by the user
                Test<String> classPackageTest = getClassPackageTest();
                ClassFinder finder = new ClassFinder(getClassLoaderInterface(),
                        buildUrlSet().getUrls(), true, this.fileProtocols,
                        classPackageTest);

                Test<ClassFinder.ClassInfo> test = getActionClassTest();
                for (Class<?> clazz : finder.findClasses(test)) {
                    classes.add(clazz);
                }
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled())
View Full Code Here

    @SuppressWarnings("unchecked")
    protected Set<Class> findActions() {
        Set<Class> classes = new HashSet<Class>();
        try {
            if (actionPackages != null || (packageLocators != null && !disablePackageLocatorsScanning)) {
                ClassFinder finder = new ClassFinder(getClassLoaderForFinder(), buildUrlSet().getUrls(), true);

                // named packages
                if (actionPackages != null) {
                    for (String packageName : actionPackages) {
                        Test<ClassFinder.ClassInfo> test = getPackageFinderTest(packageName);
                        classes.addAll(finder.findClasses(test));
                    }
                }

                //package locators
                if (packageLocators != null && !disablePackageLocatorsScanning) {
                    for (String packageLocator : packageLocators) {
                        Test<ClassFinder.ClassInfo> test = getPackageLocatorTest(packageLocator);
                        classes.addAll(finder.findClasses(test));
                    }
                }
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled())
View Full Code Here

    @SuppressWarnings("unchecked")
    protected Set<Class> findActions() {
        Set<Class> classes = new HashSet<Class>();
        try {
            if (actionPackages != null || (packageLocators != null && !disablePackageLocatorsScanning)) {
                ClassFinder finder = new ClassFinder(getClassLoaderInterface(), buildUrlSet().getUrls(), true, this.fileProtocols);

                // named packages
                if (actionPackages != null) {
                    for (String packageName : actionPackages) {
                        Test<ClassFinder.ClassInfo> test = getPackageFinderTest(packageName);
                        classes.addAll(finder.findClasses(test));
                    }
                }

                //package locators
                if (packageLocators != null && !disablePackageLocatorsScanning) {
                    for (String packageLocator : packageLocators) {
                        Test<ClassFinder.ClassInfo> test = getPackageLocatorTest(packageLocator);
                        classes.addAll(finder.findClasses(test));
                    }
                }
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled())
View Full Code Here

  @SuppressWarnings("rawtypes")
  protected Set<Class> findActions() {
    Set<Class> classes = CollectUtils.newHashSet();
    try {
      Set<String> fileProtocols = TextParseUtil.commaDelimitedStringToSet("jar");
      ClassFinder finder = new ClassFinder(getClassLoaderInterface(), buildUrls(), false,
          fileProtocols);
      for (String packageName : actionPackages) {
        Test<ClassFinder.ClassInfo> test = getPackageFinderTest(packageName);
        classes.addAll(finder.findClasses(test));
      }
    } catch (Exception ex) {
      logger.error("Unable to scan named packages", ex);
    }
View Full Code Here

        @Override
        public boolean contains(Object o) {
          return !ObjectUtils.equals(o, "file");
        }
      };
      ClassFinder finder = new ClassFinder(getClassLoaderInterface(), buildUrls(), false, jarProtocols);
      for (String packageName : actionPackages) {
        Test<ClassFinder.ClassInfo> test = getPackageFinderTest(packageName);
        classes.addAll(finder.findClasses(test));
      }
    } catch (Exception ex) {
      logger.error("Unable to scan named packages", ex);
    }
    return classes;
View Full Code Here

                // classes that can't be loaded. We pass a package filter that
                // only considers classes that match the action packages
                // specified by the user
                Test<String> classPackageTest = getClassPackageTest();
                List<URL> urls = readUrls();
                ClassFinder finder = new ClassFinder(getClassLoaderInterface(), urls, EXTRACT_BASE_INTERFACES, fileProtocols, classPackageTest);

                Test<ClassFinder.ClassInfo> test = getActionClassTest();
                classes.addAll(finder.findClasses(test));
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled())
                LOG.error("Unable to scan named packages", ex);
        }
View Full Code Here

                // classes that can't be loaded. We pass a package filter that
                // only considers classes that match the action packages
                // specified by the user
                Test<String> classPackageTest = getClassPackageTest();
                List<URL> urls = readUrls();
                ClassFinder finder = new ClassFinder(getClassLoaderInterface(), urls, EXTRACT_BASE_INTERFACES, fileProtocols, classPackageTest);

                Test<ClassFinder.ClassInfo> test = getActionClassTest();
                classes.addAll(finder.findClasses(test));
            }
        } catch (Exception ex) {
            if (LOG.isErrorEnabled())
                LOG.error("Unable to scan named packages", ex);
        }
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork2.util.finder.ClassFinder

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.