Examples of ClassFinder


Examples of br.net.woodstock.rockframework.core.reflection.ClassFinder

    super();
  }

  public XmlDocument toXML(final String baseName) {
    Assert.notEmpty(baseName, "baseName");
    ClassFinder classFinder = new ClassFinderImpl(baseName, new AnnotationClassFilter(Entity.class));
    XmlDocument document = new XmlDocument(AnnotationToXML.XML_NAMESPACE, AnnotationToXML.XML_LOCATION, AnnotationToXML.XML_ROOT);
    XmlElement entityMappings = document.getRoot();

    for (Class<?> clazz : classFinder.getClasses()) {
      XmlElement entity = entityMappings.addElement("entity");
      entity.setAttribute("class", clazz.getCanonicalName());
      entity.setAttribute("access", "PROPERTY");
      entity.setAttribute("metadata-complete", "true");
View Full Code Here

Examples of br.net.woodstock.rockframework.reflection.ClassFinder

    this.baseName = baseName;
  }

  public Collection<String> getErrors() {
    Collection<String> collection = new ArrayList<String>();
    ClassFinder classFinder = new ClassFinderImpl(this.baseName, new AssignableClassFilter(Entity.class));
    for (Class<?> clazz : classFinder.getClasses()) {
      BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(clazz).getBeanDescriptor();
      for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
        if (propertyDescriptor.isAnnotationPresent(ManyToMany.class)) {
          ManyToMany manyToMany = propertyDescriptor.getAnnotation(ManyToMany.class);
          CascadeType[] cascades = manyToMany.cascade();
View Full Code Here

Examples of com.mucommander.extension.ClassFinder

        setLookAndFeelsLoading(true);
        try {
            // Identifies all the look&feels contained by the new library and adds them to the list of custom
            // If no look&feel was found, notifies the user.
            if((newLookAndFeels = new ClassFinder().find(lookAndFeelLibrary, new LookAndFeelFilter())).isEmpty())
                InformationDialog.showWarningDialog(this, Translator.get("prefs_dialog.no_look_and_feel"));
            else if(importLookAndFeelLibrary(lookAndFeelLibrary)) {
                String currentName;

                if(customLookAndFeels == null)
View Full Code Here

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

        @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

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

                // 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

Examples of de.willuhn.util.ClassFinder

    if (umsatzRewriters == null)
    {
      umsatzRewriters = new HashMap<String,Class<UmsatzRewriter>>();
      try
      {
        ClassFinder finder = Application.getPluginLoader().getManifest(HBCI.class).getClassLoader().getClassFinder();
        Class<UmsatzRewriter>[] classes = finder.findImplementors(UmsatzRewriter.class);
        for (Class<UmsatzRewriter> c:classes)
        {
          try
          {
            UmsatzRewriter u = service.get(c);
View Full Code Here

Examples of jade.util.ClassFinder

    }

    public void run() {
      classNamesCache = new ArrayList(UPDATE_EVERY);
      numberOfClasses = 0;
      ClassFinder cf = new ClassFinder();
      cf.findSubclasses(classname, this, classfilter);
      if (classNamesCache.size() > 0) {
        appendToList(classNamesCache);
        classNamesCache.clear();
      }
      // last call, with empty list, to update status message
View Full Code Here

Examples of org.adjective.syntactic.convert.j8to7.util.ClassFinder

    public Convert8To7Visitor()
    {
        _className = new Stack<String>();
        _vars = new VariableStack();
        _classFinder = new ClassFinder();
        _importer = new Importer(_classFinder);
        _lambdaConverter = new LambdaConverter(_importer, _classFinder);
        _referenceConverter = new MemberReferenceConverter(_importer, _classFinder);
        _toMarkFinal = new ArrayList<Pair<VariableDeclarationNode, String>>();
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.message.databinding.ClassFinder

                            if(log.isDebugEnabled()){
                                log.debug("Adding cache to classpath");
                            }
                            ClassFinderFactory cff =
                                (ClassFinderFactory)FactoryRegistry.getFactory(ClassFinderFactory.class);
                            ClassFinder cf = cff.getClassFinder();
                            String cachePath = (String)serviceDesc.getAxisConfigContext().getProperty(Constants.WS_CACHE);
                            if(cachePath!=null){
                                //lets add the cache to classpath and retry loading missing artifacts.
                                if(log.isDebugEnabled()){
                                    log.debug("updating classpath with cache location");
                                }
                                cf.updateClassPath(cachePath, cl);
                                if(log.isDebugEnabled()){
                                    log.debug("trying to load class "+newValue+" from cache.");
                                }
                                cls=loadClassOrNull(newValue, cl);
                                if(cls!=null){
                                    wrapperClass=newValue;
                                }
                            }
                        }
                    }
                }
            } else {
                // If no value is provided by the annotation, then the we try default values.
                // The wsgen tool generates classes in the jaxws subpackage.
                // The wsimport tool generates classes in the same package as the SEI.
                // Note that from reading the JAX-WS spec, it seems that WSGen is doing that
                // correctly; See the conformance requirement in JAX-WS 2.0 Spec Section 3.6.2.1 Document
                // Wrapped on page 36: Conformance (Default wrapper bean package): In the absence of
                // customizations, the wrapper beans package MUST be a generated jaxws subpackage of the SEI
                // package.
                // However, if the class is in both places the runtime should prefer the one
                // in the non-jaxws package.  Why ?
                // The other classes in the non-jaxws package will cause the non-jaxws
                // wrapper to get pulled in first....thus the jaxws wrapper will cause a collision.
                //
                // Thus the following algorithm with check the non-jaxws package first
               
                Class cls1 = null// Class from the non-JAXWS package
                Class cls2 = null// Class from the JAX-WS package
                boolean cls1IsJAXB = false;
                boolean cls2IsJAXB = false;
               
               
                // Look for the class in the non-jaxws package first
                String defaultValue = null;
                if (defaultPkg.length() > 0) {
                    defaultValue = defaultPkg + "." + defaultClassName;
                } else {
                    defaultValue = defaultClassName;
                }
                if (log.isDebugEnabled()) {
                    log.debug("No provided value.  Try the default class name =  " + defaultValue);
                }
                cls1 = loadClassOrNull(defaultValue, cl);

                if (cls1 == null) {
                    cls1 = loadClassOrNull(defaultValue, altClassLoader);
                }
                if (cls1 != null) {
                    cls1IsJAXB = isJAXB(cls1);
                }

                // Now try the one in the jaxws subpackage (if cls1 is missing or perhaps not a JAXB class)
                if (cls1 == null || !cls1IsJAXB) {
                    if (defaultPkg.length() > 0) {
                        defaultValue = defaultPkg + "." + JAXWS_SUBPACKAGE + "." + defaultClassName;
                        if (log.isDebugEnabled()) {
                            log.debug("Did not find the default name.  Try a different default class name =  " + defaultValue);
                        }
                        cls2 = loadClassOrNull(defaultValue, cl);
                        if (cls2 == null) {
                            cls2 = loadClassOrNull(defaultValue, altClassLoader);
                        }
                        if(cls2==null &&
                            (type.equals("@RequestWrapper")|| type.equals("@ResponseWrapper")||type.equals("@WebFault")|| type.equals("faultInfo"))){

                          //Support for Fault Bean Generation
                          //As per JAX-WS 2.2 Specification section 3.7 an application programmer can choose not to
                          //package the faultBeans, if we have reached this point in the code then user has choosen
                          //not to package the fault bean. If there is a cache of generated artifacts available then
                          //lets look for the missing faultBean there.

                          //Support for Wrapper Bean Generation
                          //As per JAX-WS 2.2 Specificaiton section 3.6.2.1 pg 41 an application programmer does not use
                          //the wrapper bean classes, so the application need not package these classes. If we have reached
                          //this point in the code then user has choosen not to package these beans.

                          //NOTE:If we find Generated artifacts from cache this guarantees that we will not use
                          //DocLitWrappedMinimum marshaller code. The advantage of normal DocLitWrappedMarshaller is
                          //that it is very robust and has support of lot more datatypes than in DocLitWrappedMinimum.
                          if(log.isDebugEnabled()){
                            log.debug("Adding cache to classpath");
                          }
                            if(log.isDebugEnabled()){
                                log.debug("Adding cache to classpath");
                            }
                            ClassFinderFactory cff =
                                (ClassFinderFactory)FactoryRegistry.getFactory(ClassFinderFactory.class);
                            ClassFinder cf = cff.getClassFinder();
                            String cachePath = (String)serviceDesc.getAxisConfigContext().getProperty(Constants.WS_CACHE);
                            if(log.isDebugEnabled()){
                                log.debug("cachePath = "+cachePath);
                            }
                            if(cachePath!=null){
                                //lets add the cache to classpath and retry loading missing artifacts.
                                if(log.isDebugEnabled()){
                                    log.debug("updating classpath with cache location");
                                }
                                cf.updateClassPath(cachePath, cl);
                                if(log.isDebugEnabled()){
                                    log.debug("trying to load class "+defaultValue+" from cache.");
                                }
                                cls2=loadClassOrNull(defaultValue, cl);
                            }
View Full Code Here

Examples of org.apache.hadoop.hbase.ClassFinder

     * according to the filter specific on the command line (if any).
     */
    private Class<?>[] findEnd2EndTestClasses()
      throws ClassNotFoundException, LinkageError, IOException {
      End2EndFileNameFilter nameFilter = new End2EndFileNameFilter();
      ClassFinder classFinder = new ClassFinder(nameFilter, end2endTestFilter);
      Set<Class<?>> classes = classFinder.findClasses("org.apache.phoenix.end2end", true);
      return classes.toArray(new Class<?>[classes.size()]);
    }
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.