站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

FileBuiltQuery (NetBeans General Queries API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.api.queries
Class FileBuiltQuery

java.lang.Object
  extended byorg.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:
FileBuiltQueryImplementation

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

getStatus

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 Foo.java 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.

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

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.