Package com.caucho.loader

Examples of com.caucho.loader.DynamicClassLoader


   * Returns true if the server has been modified and needs restarting.
   */
  @Override
  public boolean isModified()
  {
    DynamicClassLoader classLoader = getClassLoader();
   
    if (classLoader != null)
      return classLoader.isModified();
    else
      return true;
  }
View Full Code Here


  }
 
  @Override
  public boolean logModified(Logger log)
  {
    DynamicClassLoader classLoader = getClassLoader();
   
    if (classLoader != null)
      return classLoader.logModified(log);
    else {
      log.info(this + " is closed");

      return true;
    }
View Full Code Here

  /**
   * Returns true if the server has been modified and needs restarting.
   */
  public boolean isModifiedNow()
  {
    DynamicClassLoader classLoader = getClassLoader();
   
    if (classLoader != null)
      return classLoader.isModifiedNow();
    else
      return true;
  }
View Full Code Here

  public void init(FilterConfig config)
    throws ServletException
  {
    _stylePath = new MergePath();
    _stylePath.addMergePath(Vfs.lookup());
    DynamicClassLoader loader;
    loader = (DynamicClassLoader) Thread.currentThread().getContextClassLoader();
    String resourcePath = loader.getResourcePathSpecificFirst();
    _stylePath.addClassPath(resourcePath);

    _application = config.getServletContext();

    if ("true".equals(config.getInitParameter("unconditional")))
View Full Code Here

    throws Exception
  {
    ClassLoader parentLoader = getParentLoader();
   
    if (parentLoader instanceof DynamicClassLoader) {
      DynamicClassLoader dcl = (DynamicClassLoader) parentLoader;

      dcl.make();
    }

    Path workPath = getClassDir();

    _cl = beanClass;
View Full Code Here

   * Adds any class path from the manifest.
   */
  protected void addManifestClassPath()
    throws IOException
  {
    DynamicClassLoader loader = Environment.getDynamicClassLoader();

    if (loader == null)
      return;

    Manifest manifest = getManifest();

    if (manifest == null)
      return;

    Attributes main = manifest.getMainAttributes();

    if (main == null)
      return;

    String classPath = main.getValue("Class-Path");

    Path pwd = null;

    if (getArchivePath() != null)
      pwd = getArchivePath().getParent();
    else
      pwd = getRootDirectory();

    if (classPath == null) {
    }
    else if (_manifestLoader != null)
      _manifestLoader.addManifestClassPath(classPath, pwd);
    else
      loader.addManifestClassPath(classPath, pwd);
  }
View Full Code Here

               ClassLoader parentLoader,
               Path appDir,
               ServletConfig config)
    throws Exception
  {
    DynamicClassLoader loader;

    String fullClassName = className;
    String mangledName = fullClassName.replace('.', '/');

    Path classPath = getClassDir().lookup(mangledName + ".class");
View Full Code Here

    if (_loader == null)
      loader = _systemClassLoader;

    ArrayList<String> pkgList = loadPackageList(pkg);
   
    DynamicClassLoader dynLoader = null;
   
    if (loader instanceof DynamicClassLoader)
      dynLoader = (DynamicClassLoader) loader;

    for (String pkgName : pkgList) {
      try {
        Class<?> cl;
       
        if (dynLoader != null)
          cl = dynLoader.loadClassImpl(pkgName + '.' + name, false);
        else
          cl = Class.forName(pkgName + '.' + name, false, loader);

        if (cl != null)
          return cl;
View Full Code Here

      }

      if (_classLoader != null)
        _classLoader.getNewTempClassLoader();
      else
        new DynamicClassLoader(null);
    } finally {
      thread.setContextClassLoader(oldLoader);
    }
  }
View Full Code Here

                                        boolean isLocal)
  {
    ArrayList<T> services = new ArrayList<T>();

    try {
      DynamicClassLoader loader = _classLoader;

      if (loader == null)
        return services;
     
      String serviceName = "META-INF/services/" + serviceApiClass.getName();
     
      Enumeration<URL> e;
     
      if (isLocal)
        e = loader.findResources(serviceName);
      else
        e = loader.getResources(serviceName);

      while (e.hasMoreElements()) {
        URL url = e.nextElement();

        if (serviceSet.contains(url))
View Full Code Here

TOP

Related Classes of com.caucho.loader.DynamicClassLoader

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.