FeaturesPluginsDocs & SupportCommunityPartners

org.netbeans.modules.jackpot/2 2 1

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.
 

Method Detail

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.

org.netbeans.modules.jackpot/2 2 1

Built on April 6 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by