Package javassist

Examples of javassist.LoaderClassPath


   */
  @SuppressWarnings({ "deprecation", "unchecked" })
  public void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event, BeanManager manager) throws RuntimeException {
    try {
      ClassPool cp = ClassPool.getDefault();
      cp.insertClassPath(new LoaderClassPath(Thread.currentThread().getContextClassLoader()));
      cp.importPackage("org.zkoss.zul");
      cp.importPackage("org.zkoss.zk.ui");
      cp.importPackage("org.zkoss.cdi.util");
     
      CtClass mainclas = cp.makeClass("org.zkoss.zkplus.cdi.ZKComponentProducerMethods");
View Full Code Here


    * @return javassist class pool
    */
   protected ClassPool createClassPool(ClassLoader classLoader)
   {
      ClassPool pool = new ClassPool();
      ClassPath classPath = new LoaderClassPath(classLoader);
      pool.insertClassPath(classPath);
      return pool;
   }
View Full Code Here

      throws WebServicePublishException {
    pool = new ClassPool() ;
    final ClassLoader tccl = Thread.currentThread().getContextClassLoader() ;
    if (tccl != null)
    {
      pool.appendClassPath(new LoaderClassPath(tccl)) ;
    }
    pool.appendClassPath(new LoaderClassPath(JAXWSProviderClassGenerator.class.getClassLoader())) ;
    try {
      oneWaySuperClass = pool.get(OneWayBaseWebService.class.getName());
      requestResponseSuperClass = pool.get(RequestResponseBaseWebService.class.getName()) ;
    } catch (final NotFoundException nfe) {
      throw new WebServicePublishException("Failed to obtain superclasses", nfe) ;
View Full Code Here

        private WeakReference<ClassLoader> classLoader;

        public ClassLoaderBoundClassPool(ClassLoader classLoader) {
            this.classLoader = new WeakReference<ClassLoader>(classLoader);
            this.insertClassPath(new LoaderClassPath(classLoader));
        }
View Full Code Here

    {
        ClassFactoryClassPool pool = new ClassFactoryClassPool(_contextClassLoader);

        Loader loader = new TestPackageAwareLoader(_contextClassLoader, pool);

        pool.appendClassPath(new LoaderClassPath(loader));

        ClassFactory cf = new ClassFactoryImpl(loader, pool, logger);

        CtClass ctClass = pool.get(componentClassName);
        InternalClassTransformation transformation = new InternalClassTransformationImpl(ctClass, cf, logger, null);
View Full Code Here

        _loader = new TestPackageAwareLoader(_contextClassLoader, _classFactoryClassPool);

        // Inside Maven Surefire, the system classpath is not sufficient to find all
        // the necessary files.
        _classFactoryClassPool.appendClassPath(new LoaderClassPath(_loader));

        Logger logger = LoggerFactory.getLogger(InternalClassTransformationImplTest.class);

        _classFactory = new ClassFactoryImpl(_loader, _classFactoryClassPool, logger);
    }
View Full Code Here

  /**
   * 建立代理模块, 配置基本的系统环境
   */
  public ProxyModule() {
    classPool = new ClassPool();
    classPool.appendClassPath(new LoaderClassPath(this.getClass()
        .getClassLoader()));
  }
View Full Code Here

    componentLoader = Util.getClassloader(project, getLog());

    // Set up class pool with all the project dependencies and the project classes themselves
    ClassPool classPool = new ClassPool(true);
    classPool.appendClassPath(new LoaderClassPath(componentLoader));

    // Set up map to keep a report per class.
    Multimap<String, String> reportData = LinkedHashMultimap.create();

    // Determine where to write the missing meta data report file
View Full Code Here

  private void preprocessSpringBeansForZKComponentinjection(ServletContextEvent sce) {
    try {
      String webInf = sce.getServletContext().getRealPath("/WEB-INF/classes");
 
      ClassPool cp = ClassPool.getDefault();
      cp.insertClassPath(new LoaderClassPath(Thread.currentThread().getContextClassLoader()));
      cp.importPackage("java.lang");
      cp.importPackage("org.zkoss.zul");
      cp.importPackage("org.zkoss.zk.ui");
      cp.importPackage("org.zkoss.spring.util");
      cp.importPackage("org.springframework.context.annotation");
View Full Code Here

        _loader.delegateLoadingOf("org.apache.tapestry.");

        // Inside Maven Surefire, the system classpath is not sufficient to find all
        // the necessary files.
        _classPool.appendClassPath(new LoaderClassPath(_loader));
    }
View Full Code Here

TOP

Related Classes of javassist.LoaderClassPath

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.