org.netbeans.api.jackpot
Interface Query
- All Known Subinterfaces:
- Transformer
- All Known Implementing Classes:
- TreePathQuery, TreePathTransformer
public interface Query
A Query is applied to a a set of source files (defined by a
JavaSource instance) and reports any matching results.
|
Method Summary |
void |
attach(org.netbeans.api.java.source.CompilationInfo info)
Attach this Query instance to the specified CompilationInfo prior
to processing one or more source files. |
void |
cancel()
Cancel (stop) query execution. |
void |
destroy()
Release any instance data shared by invocations, including all references
to the JavaSource instanced passed to init(). |
org.netbeans.api.java.source.CompilationInfo |
getCompilationInfo()
Returns the CompilationInfo attached to this query. |
org.netbeans.api.java.source.JavaSource |
getJavaSource()
Returns the JavaSource this query was initialized with. |
void |
init(QueryContext context,
org.netbeans.api.java.source.JavaSource source)
Initialize any data that is shared across source file processing
invocations. |
void |
release()
Release any instance data created by attach() or the processing of
a set of source files. |
void |
run()
Execute the query for the set of source files. |
init
void init(QueryContext context,
org.netbeans.api.java.source.JavaSource source)
- Initialize any data that is shared across source file processing
invocations.
- Parameters:
context - the application environment the query executes within.source - the JavaSource instance which this query is invoked with.
attach
void attach(org.netbeans.api.java.source.CompilationInfo info)
- Attach this Query instance to the specified CompilationInfo prior
to processing one or more source files.
- Parameters:
info - the CompilationInfo associated with this set of source files.
run
void run()
- Execute the query for the set of source files.
release
void release()
- Release any instance data created by attach() or the processing of
a set of source files. All references to the attached CompilationInfo
and its source files must be released.
destroy
void destroy()
- Release any instance data shared by invocations, including all references
to the JavaSource instanced passed to
init().
cancel
void cancel()
- Cancel (stop) query execution.
getJavaSource
org.netbeans.api.java.source.JavaSource getJavaSource()
- Returns the JavaSource this query was initialized with.
- Returns:
- the JavaSource, or null if not initialized.
getCompilationInfo
org.netbeans.api.java.source.CompilationInfo getCompilationInfo()
- Returns the CompilationInfo attached to this query.
- Returns:
- the CompilationInfo, or null if not attached.