public boolean eval(){
  if (sourceFileSets.size() == 0 && sourceResources.size() == 0 && sourceFile == null) {
    throw new BuildException("At least one srcfile or a nested <srcfiles> or <srcresources> element must be set.");
  }
  if ((sourceFileSets.size() > 0 || sourceResources.size() > 0) && sourceFile != null) {
    throw new BuildException("Cannot specify both the srcfile attribute and a nested <srcfiles> or <srcresources> element.");
  }
  if (urlbase == null) {
    throw new BuildException("The urlbase attribute must be set.");
  }
  if (sourceFile != null && !sourceFile.exists()) {
    throw new BuildException(sourceFile.getAbsolutePath() + " not found.");
  }
  boolean upToDate=true;
  if (sourceFile != null) {
    Resource fileResource=new FileResource(sourceFile);
    upToDate=isUpToDate(fileResource);
  }
  if (upToDate) {
    Enumeration e=sourceFileSets.elements();
    while (upToDate && e.hasMoreElements()) {
      FileSet fs=(FileSet)e.nextElement();
      Iterator it=fs.iterator();
      while (upToDate && it.hasNext()) {
        Resource r=(Resource)it.next();
        upToDate=isUpToDate(r);
      }
    }
  }
  if (upToDate) {
    Resource[] r=sourceResources.listResources();
    for (int i=0; upToDate && i < r.length; i++) {
      upToDate=isUpToDate(r[i]);
    }
  }
  return upToDate;
}

public boolean eval ( ) { if ( sourceFileSets . size ( ) == 0 && sourceResources . size ( ) == 0 && sourceFile == null ) { throw new BuildException ( "At least one srcfile or a nested <srcfiles> or <srcresources> element must be set." ) ; } if ( ( sourceFileSets . size ( ) > 0 || sourceResources . size ( ) > 0 ) && sourceFile != null ) { throw new BuildException ( "Cannot specify both the srcfile attribute and a nested <srcfiles> or <srcresources> element." ) ; } if ( urlbase == null ) { throw new BuildException ( "The urlbase attribute must be set." ) ; } if ( sourceFile != null && ! sourceFile . exists ( ) ) { throw new BuildException ( sourceFile . getAbsolutePath ( ) + " not found." ) ; } boolean upToDate = true ; if ( sourceFile != null ) { Resource fileResource = new FileResource ( sourceFile ) ; upToDate = isUpToDate ( fileResource ) ; } if ( upToDate ) { Enumeration e = sourceFileSets . elements ( ) ; while ( upToDate && e . hasMoreElements ( ) ) { FileSet fs = ( FileSet ) e . nextElement ( ) ; Iterator it = fs . iterator ( ) ; while ( upToDate && it . hasNext ( ) ) { Resource r = ( Resource ) it . next ( ) ; upToDate = isUpToDate ( r ) ; } } } if ( upToDate ) { Resource [ ] r = sourceResources . listResources ( ) ; for ( int i = 0 ; upToDate && i < r . length ; i ++ ) { upToDate = isUpToDate ( r [ i ] ) ; } } return upToDate ; }
evaluate ( all ) target and source file ( s ) to see if the target ( s ) is / are up - to - date .
