org.netbeans.modules.queries/1 1.7.22

Class FileBuiltQuery

  extended by org.netbeans.api.queries.FileBuiltQuery

public final class FileBuiltQuery
extends Object

Test whether a file can be considered to be built (up to date).

See Also:

Nested Class Summary
static interface FileBuiltQuery.Status
          Result of getting built status for a file.
Method Summary
static FileBuiltQuery.Status getStatus(FileObject file)
          Check whether a (source) file has been somehow built or processed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public static FileBuiltQuery.Status getStatus(FileObject file)
Check whether a (source) file has been somehow built or processed.

This would typically mean that at least its syntax has been validated by a build system, some conventional output file exists and is at least as new as the source file, etc. For example, for a source file, this could check whether Foo.class exists (in the appropriate build directory) with at least as new a timestamp.

Implementation note: the current implementation of this method does not react to changes in lookup results for FileBuiltQueryImplementation. For example, if there is initially no provider for a given file, the return value may be null, and a client will not be see the change if a provider is later installed dynamically. Similarly, removal of a provider will not automatically invalidate an existing FileBuiltQuery.Status object; and a change in the provider responsible for a given file will not produce updates in an existing FileBuiltQuery.Status. A future implementation may however be enhanced to return proxy statuses which react to changes in the provider responsible for the file and always delegate to the current provider, if there is one.

file - a source file which can be built to a direct product
a status object that can be listened to, or null for no answer

org.netbeans.modules.queries/1 1.7.22

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.