Examples of ClassLoaderInterfaceDelegate


Examples of cn.wensiqun.classloader.ClassLoaderInterfaceDelegate

      return grep;
    }


  public void setClassLoader(ClassLoader classLoaderInterface) {
    this.classLoaderInterface = new ClassLoaderInterfaceDelegate(classLoaderInterface);
  }
View Full Code Here

Examples of cn.wensiqun.classloader.ClassLoaderInterfaceDelegate

  public InvokerGrepRobot(Class<?> clazz, Method[] methods, Constructor<?>[] constrs) {
    this(clazz, methods, constrs, Thread.currentThread().getContextClassLoader());
  }
 
  public InvokerGrepRobot(Class<?> clazz, Method[] methods, Constructor<?>[] constrs, ClassLoader classLoader) {
    this(clazz, methods, constrs, new ClassLoaderInterfaceDelegate(classLoader));
  }
View Full Code Here

Examples of cn.wensiqun.classloader.ClassLoaderInterfaceDelegate

  public InvokerGrepRobot(ClassReader reader, Method[] methods, Constructor<?>[] constrs) {
    this(reader, methods, constrs, Thread.currentThread().getContextClassLoader());
  }
 
  public InvokerGrepRobot(ClassReader reader, Method[] methods, Constructor<?>[] constrs, ClassLoader classLoader) {
    this(reader, methods, constrs, new ClassLoaderInterfaceDelegate(classLoader));
  }
View Full Code Here

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

    logger.info("Action scan completely,create {} action in {} ms", newActions,
        System.currentTimeMillis() - start);
  }

  protected ClassLoaderInterface getClassLoaderInterface() {
    if (isReloadEnabled()) return new ClassLoaderInterfaceDelegate(reloadingClassLoader);
    else {
      ClassLoaderInterface classLoaderInterface = null;
      ActionContext ctx = ActionContext.getContext();
      if (ctx != null) classLoaderInterface = (ClassLoaderInterface) ctx
          .get(ClassLoaderInterface.CLASS_LOADER_INTERFACE);
      return (ClassLoaderInterface) ObjectUtils.defaultIfNull(classLoaderInterface,
          new ClassLoaderInterfaceDelegate(getClassLoader()));
    }
  }
View Full Code Here

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

        }
    }

    protected ClassLoaderInterface getClassLoaderInterface() {
        if (isReloadEnabled())
            return new ClassLoaderInterfaceDelegate(this.reloadingClassLoader);
        else {
            /*
            if there is a ClassLoaderInterface in the context, use it, otherwise
            default to the default ClassLoaderInterface (a wrapper around the current
            thread classloader)
            using this, other plugins (like OSGi) can plugin their own classloader for a while
            and it will be used by Convention (it cannot be a bean, as Convention is likely to be
            called multiple times, and it needs to use the default ClassLoaderInterface during normal startup)
            */
            ClassLoaderInterface classLoaderInterface = null;
            ActionContext ctx = ActionContext.getContext();
            if (ctx != null)
                classLoaderInterface = (ClassLoaderInterface) ctx.get(ClassLoaderInterface.CLASS_LOADER_INTERFACE);

            return ObjectUtils.defaultIfNull(classLoaderInterface, new ClassLoaderInterfaceDelegate(getClassLoader()));
        }
    }
View Full Code Here

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

                urlSet = urlSet.exclude(parent);

            try {
                // This may fail in some sandboxes, ie GAE
                ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
                urlSet = urlSet.exclude(new ClassLoaderInterfaceDelegate(systemClassLoader.getParent()));

            } catch (SecurityException e) {
                if (LOG.isWarnEnabled())
                    LOG.warn("Could not get the system classloader due to security constraints, there may be improper urls left to scan");
            }
View Full Code Here

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

        ClassLoaderInterface classLoaderInterface = null;
        ActionContext ctx = ActionContext.getContext();
        if (ctx != null)
            classLoaderInterface = (ClassLoaderInterface) ctx.get(ClassLoaderInterface.CLASS_LOADER_INTERFACE);

        return (ClassLoaderInterface) ObjectUtils.defaultIfNull(classLoaderInterface, new ClassLoaderInterfaceDelegate(Thread.currentThread().getContextClassLoader()));

    }
View Full Code Here

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

        }
    }

    protected ClassLoaderInterface getClassLoaderInterface() {
        if (isReloadEnabled())
            return new ClassLoaderInterfaceDelegate(this.reloadingClassLoader);
        else {
            /*
            if there is a ClassLoaderInterface in the context, use it, otherwise
            default to the default ClassLoaderInterface (a wrapper around the current
            thread classloader)
            using this, other plugins (like OSGi) can plugin their own classloader for a while
            and it will be used by Convention (it cannot be a bean, as Convention is likely to be
            called multiple times, and it needs to use the default ClassLoaderInterface during normal startup)
            */
            ClassLoaderInterface classLoaderInterface = null;
            ActionContext ctx = ActionContext.getContext();
            if (ctx != null)
                classLoaderInterface = (ClassLoaderInterface) ctx.get(ClassLoaderInterface.CLASS_LOADER_INTERFACE);

            return ObjectUtils.defaultIfNull(classLoaderInterface, new ClassLoaderInterfaceDelegate(getClassLoader()));
        }
    }
View Full Code Here

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

                urlSet = urlSet.exclude(parent);

            try {
                // This may fail in some sandboxes, ie GAE
                ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
                urlSet = urlSet.exclude(new ClassLoaderInterfaceDelegate(systemClassLoader.getParent()));

            } catch (SecurityException e) {
                if (LOG.isWarnEnabled())
                    LOG.warn("Could not get the system classloader due to security constraints, there may be improper urls left to scan");
            }
View Full Code Here

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

        ClassLoaderInterface classLoaderInterface = null;
        ServletContext ctx = ServletActionContext.getServletContext();
        if (ctx != null)
            classLoaderInterface = (ClassLoaderInterface) ctx.getAttribute(ClassLoaderInterface.CLASS_LOADER_INTERFACE);

        return (ClassLoaderInterface) ObjectUtils.defaultIfNull(classLoaderInterface, new ClassLoaderInterfaceDelegate(JSPLoader.class.getClassLoader()));
    }
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.