Package org.eclipse.equinox.p2.query
Class ExpressionMatchQuery<T>
java.lang.Object
org.eclipse.equinox.p2.query.ExpressionMatchQuery<T>
- All Implemented Interfaces:
IQueryWithIndex<T>
,IMatchQuery<T>
,IQuery<T>
- Direct Known Subclasses:
ArtifactDescriptorQuery
,ArtifactKeyQuery
,IUProfilePropertyQuery
,OSGiBundleQuery
A query that matches candidates against an expression.
- Since:
- 2.0
-
Constructor Summary
ConstructorDescriptionExpressionMatchQuery
(Class<? extends T> matchingClass, String expression, Object... parameters) ExpressionMatchQuery
(Class<? extends T> matchingClass, IExpression expression, Object... parameters) -
Method Summary
Modifier and TypeMethodDescriptionReturns the IExpression backing this query ornull
if this is not an expression query.boolean
Returns whether the given object satisfies the parameters of this query.Evaluates the query for a specific input.perform
(IIndexProvider<T> indexProvider) Evaluates the query using theindexProvider
.void
void
void
setIndexProvider
(IIndexProvider<T> indexProvider)
-
Constructor Details
-
ExpressionMatchQuery
public ExpressionMatchQuery(Class<? extends T> matchingClass, IExpression expression, Object... parameters) -
ExpressionMatchQuery
-
-
Method Details
-
getContext
-
getMatchingClass
-
perform
Description copied from interface:IQueryWithIndex
Evaluates the query using theindexProvider
. The query is first analyzed for index candidates (typically expressions like id == <some value>) and if possible, indexes returned byIIndexProvider.getIndex(String)
will be used in place of the iterator returned byIIndexProvider.everything()
.- Specified by:
perform
in interfaceIQueryWithIndex<T>
- Parameters:
indexProvider
- The provider of the material to evaluate the query on- Returns:
- The results of the query.
-
perform
Description copied from interface:IQuery
Evaluates the query for a specific input. -
isMatch
Description copied from interface:IMatchQuery
Returns whether the given object satisfies the parameters of this query.- Specified by:
isMatch
in interfaceIMatchQuery<T>
- Parameters:
candidate
- The object to perform the query against- Returns:
true
if the unit satisfies the parameters of this query, andfalse
otherwise
-
getExpression
Description copied from interface:IQuery
Returns the IExpression backing this query ornull
if this is not an expression query.- Specified by:
getExpression
in interfaceIQuery<T>
- Returns:
- An expression or
null
.
-
setIndexProvider
-
prePerform
public void prePerform() -
postPerform
public void postPerform()
-