Package org.ocpsoft.rewrite.el.spi

Examples of org.ocpsoft.rewrite.el.spi.BeanNameResolver


   {

      // load the available SPI implementations
      Iterator<BeanNameResolver> iterator = ServiceLoader.load(BeanNameResolver.class).iterator();
      while (iterator.hasNext()) {
         BeanNameResolver resolver = iterator.next();

         // check if this implementation is able to tell the name
         String beanName = resolver.getBeanName(clazz);

         if (log.isTraceEnabled()) {
            log.trace("Service provider [{}] returned [{}] for class [{}]", new Object[] {
                     resolver.getClass().getSimpleName(), beanName, clazz.getName()
            });
         }

         // the first result is accepted
         if (beanName != null) {
View Full Code Here


      // call init() method on all resolvers
      while (beanNameFinderIterator.hasNext())
      {

         // log resolver name
         BeanNameResolver resolver = beanNameFinderIterator.next();
         if (log.isTraceEnabled())
         {
            log.trace("Initializing BeanNameResolver: " + resolver.getClass().getName());
         }

         try
         {
            resolvers.add(resolver);
         }
         catch (ClassFormatError e)
         {
            /*
             * Seems to happen for CDI classes when using GWT
             * In this case just ignore the resolver
             * See: http://code.google.com/p/prettyfaces/issues/detail?id=101
             */
            log.warn("Failed to initialize " + resolver.getClass().getSimpleName() + ": " + e.getMessage());
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.ocpsoft.rewrite.el.spi.BeanNameResolver

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.