Means that there is no method with your signature. Provided method is:
    public DirectoryScanner getDirectoryScanner(Project p)

I recommend downloading the src-distro and looking into the sources while
programming
tasks.


Jan


> -----Original Message-----
> From: Mark McKay [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 21, 2004 9:45 AM
> To: [EMAIL PROTECTED]
> Subject: Help creating a MatchingTask
> 
> 
> 
> I'm trying to create a custom ant task that I can call from my build 
> scripts.  Right now I'm just trying to figure out how to write a task 
> that can accept a fileset and iterate through all valid 
> files.  My best 
> guess so far is below.
> 
> Unfortunately, this is giving me errors that I have not 
> encountered in 
> Java before.  What does 'cannot be applied to ()' mean?  Could anyone 
> suggest what I could do to fix my program?
> 
> Thanks.
> 
> Mark McKay
> 
> 
> =========================
> 
> Error:
> 
> com/kitfox/anttask/MyAntTask.java [26:1] 
> getDirectoryScanner(org.apache.tools.ant.Project) in 
> org.apache.tools.ant.types.AbstractFileSet cannot be applied to ()
>         DirectoryScanner scanner = fs.getDirectoryScanner();
>                                      ^
> 1 error
> Errors compiling MyAntTask.
> 
> 
> =========================
> 
> 
> package com.kitfox.anttask;
> 
> import org.apache.tools.ant.*;
> import org.apache.tools.ant.taskdefs.*;
> import org.apache.tools.ant.types.*;
> 
> /**
>  *
>  * @author  kitfox
>  */
> public class MyAntTask extends MatchingTask {
>    
>     /** Creates a new instance of MyAntTask */
>     public MyAntTask() {
>     }
>    
>     public void execute() throws BuildException
>     {
>         FileSet fs = getImplicitFileSet();
>         DirectoryScanner scanner = fs.getDirectoryScanner();
>        
>         scanner.scan();
>        
>         String[] files = scanner.getIncludedFiles();
>         for (int i = 0; i < files.length; i++) {
>             System.out.println(files[i]);
>         }
>     }
>    
> }
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to