Package com.caucho.vfs

Examples of com.caucho.vfs.Depend


  {
    if (_dependList == null)
      return false;

    for (int i = 0; i < _dependList.size(); i++) {
      Depend depend = _dependList.get(i);

      if (depend.isModified())
        return true;
    }

    return false;
  }
View Full Code Here


   *
   * @param depend the dependency to add
   */
  public static void addDependency(Path path)
  {
    addDependency(new Depend(path));
  }
View Full Code Here

   * @param path the dependency to add
   * @param loader the context loader
   */
  public static void addDependency(Path path, ClassLoader loader)
  {
    addDependency(new Depend(path), loader);
  }
View Full Code Here

    else if (_path.canRead() && ! _path.isDirectory()) {
    }
    else if (_isOptional && ! _path.exists()) {
      log.finer(L.l("resin:import '{0}' is not readable.", _path));

      Environment.addDependency(new Depend(_path));
      return;
    }
    else {
      throw new ConfigException(L.l("Required file '{0}' can not be read for resin:import.",
                                    _path.getNativePath()));
    }
   
    Object object = getObject();

    String schema = null;
    // Use the relax schema for beans with schema.
    if (object instanceof SchemaBean) {
      schema = ((SchemaBean) object).getSchema();
    }

    ArrayList<Path> paths;

    if (_fileSet != null)
      paths = _fileSet.getPaths();
    else {
      paths = new ArrayList<Path>();
      paths.add(_path);
    }

    for (int i = 0; i < paths.size(); i++) {
      Path path = paths.get(i);

      log.config(L.l("resin:import '{0}'", path.getNativePath()));

      Environment.addDependency(new Depend(path));

      Config config = new Config();
      // server/10hc
      // config.setResinInclude(true);
View Full Code Here

  protected void setDependPath(Path dependPath)
  {
    if (dependPath instanceof JarPath)
      _depend = ((JarPath) dependPath).getDepend();
    else
      _depend = new Depend(dependPath);
  }
View Full Code Here

  /**
   * Adds a dependency.
   */
  public void addDepend(Path path)
  {
    Depend depend = new Depend(path);

    depend.setRequireSource(_quercus.isRequireSource());

    _dependList.add(depend);
    _depend.add(depend);
  }
View Full Code Here

   
    for (int i = 0; i < _dependList.size(); i++) {
      PersistentDependency dependency = _dependList.get(i);

      if (dependency instanceof Depend) {
        Depend depend = (Depend) _dependList.get(i);
        Path path = depend.getPath();

        out.print("_caucho_depend[" + i + "] = new com.caucho.vfs.Depend(");
       
        // php/3b33
        String relativePath;
        if (searchPath != null)
          relativePath = searchPath.lookup(path.getRelativePath()).getRelativePath();
        else {
          String fullPath = path.getFullPath();
          String pwd = Vfs.lookup().getFullPath();

          if (fullPath.startsWith(pwd))
            relativePath = "./" + fullPath.substring(pwd.length());
          else
            relativePath = fullPath;
        }

        out.print("path.lookup(\"" + relativePath + "\"), ");
   
        out.println(depend.getDigest() + "L, "
                    + depend.getRequireSource() + ");");
      }
      else {
        out.print("_caucho_depend[" + i + "] = ");
        out.print(dependency.getJavaCreateString());
        out.println(";");
View Full Code Here

        javaClass.remove();
      */
         
      compiler.compileIfModified(source, null);
    } catch (Exception e) {
      getClassLoader().addDependency(new Depend(javaSource));

      log.log(Level.FINEST, e.toString(), e);

      // Compile errors are wrapped in a special ClassNotFound class
      // so the server can give a nice error message
View Full Code Here

      if (pathList != null) {
        dependList = new ArrayList<Dependency>();

        for (int i = 0; i < pathList.size(); i++) {
          dependList.add(new Depend(pathList.get(i)));
        }
      }

      _dependList = dependList;
    }
View Full Code Here

   * Initialize
   */
  @PostConstruct
  public void init()
  {
    Depend depend = new Depend(_path);

    Environment.addDependency(depend);
  }
View Full Code Here

TOP

Related Classes of com.caucho.vfs.Depend

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.