Package com.ocpsoft.pretty.faces.config.annotation

Examples of com.ocpsoft.pretty.faces.config.annotation.PrettyAnnotationHandler


         return null;
      }

      PackageFilter packageFilter = new PackageFilter(packageFilters);
      LazyBeanNameFinder beanNameFinder = new LazyBeanNameFinder(servletContext);
      PrettyAnnotationHandler annotationHandler = new PrettyAnnotationHandler(beanNameFinder);

      ClassLoader classloader = Thread.currentThread().getContextClassLoader();
      if (classloader == null)
      {
         classloader = this.getClass().getClassLoader();
      }

      List<ClassFinder> classFinders = new ArrayList<ClassFinder>();

      ByteCodeFilter byteCodeFilter = getByteCodeFilter();

      classFinders.add(new WebClassesFinder(servletContext, classloader, packageFilter, byteCodeFilter));

      // does the user want to scan /WEB-INF/lib ?
      String jarConfig = servletContext.getInitParameter(CONFIG_SCAN_LIB_DIR);
      if ((jarConfig != null) && jarConfig.trim().equalsIgnoreCase("true"))
      {
         classFinders.add(new WebLibFinder(servletContext, classloader, packageFilter, byteCodeFilter));
      }

      for (ClassFinder finder : classFinders)
      {
         finder.findClasses(annotationHandler);
      }

      PrettyConfigBuilder builder = new PrettyConfigBuilder();
      annotationHandler.build(builder);
      return builder.build();
   }
View Full Code Here


         return null;
      }

      PackageFilter packageFilter = new PackageFilter(packageFilters);
      LazyBeanNameFinder beanNameFinder = new LazyBeanNameFinder(servletContext);
      PrettyAnnotationHandler annotationHandler = new PrettyAnnotationHandler(beanNameFinder);

      ClassLoader classloader = Thread.currentThread().getContextClassLoader();
      if (classloader == null)
      {
         classloader = this.getClass().getClassLoader();
      }

      List<ClassFinder> classFinders = new ArrayList<ClassFinder>();

      // we will always scan /WEB-INF/classes
      classFinders.add(new WebClassesFinder(servletContext, classloader, packageFilter));

      // does the user want to scan /WEB-INF/lib ?
      String jarConfig = servletContext.getInitParameter(CONFIG_SCAN_LIB_DIR);
      if ((jarConfig != null) && jarConfig.trim().equalsIgnoreCase("true"))
      {
         classFinders.add(new WebLibFinder(servletContext, classloader, packageFilter));
      }

      for (ClassFinder finder : classFinders)
      {
         finder.findClasses(annotationHandler);
      }

      PrettyConfigBuilder builder = new PrettyConfigBuilder();
      annotationHandler.build(builder);
      return builder.build();
   }
View Full Code Here

TOP

Related Classes of com.ocpsoft.pretty.faces.config.annotation.PrettyAnnotationHandler

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.