KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > spi > queries > FileBuiltQueryImplementation


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.spi.queries;
21
22 import org.netbeans.api.queries.FileBuiltQuery;
23 import org.openide.filesystems.FileObject;
24
25 /**
26  * Test whether a file can be considered to be built (up to date).
27  * Register to default lookup.
28  * <p class="nonnormative">
29  * Rather than registering a global instance, if your implementation
30  * is applicable only to project-owned files, you should add it to
31  * <a HREF="@PROJECTS/PROJECTAPI@/org/netbeans/api/project/Project.html#getLookup"><code>Project.getLookup()</code></a>
32  * and depend on
33  * the <code>org.netbeans.modules.projectapi</code> module.
34  * </p>
35  * @see FileBuiltQuery
36  * @see <a HREF="@ANT/PROJECT@/org/netbeans/spi/project/support/ant/AntProjectHelper.html#createGlobFileBuiltQuery(java.lang.String[],%20java.lang.String[])"><code>AntProjectHelper.createGlobFileBuiltQuery(...)</code></a>
37  * @author Jesse Glick
38  */

39 public interface FileBuiltQueryImplementation {
40     
41     /**
42      * Check whether a (source) file has been <em>somehow</em> built
43      * or processed.
44      * This would typically mean that at least its syntax has been
45      * validated by a build system, some conventional output file exists
46      * and is at least as new as the source file, etc.
47      * For example, for a <samp>Foo.java</samp> source file, this could
48      * check whether <samp>Foo.class</samp> exists (in the appropriate
49      * build directory) with at least as new a timestamp.
50      * @param file a source file which can be built to a direct product
51      * @return a status object that can be queries and listened to,
52      * or null for no answer
53      */

54     FileBuiltQuery.Status getStatus(FileObject file);
55     
56 }
57
Popular Tags