Package org.eclipse.equinox.p2.query
Class ExpressionQuery<T>
- java.lang.Object
-
- org.eclipse.equinox.p2.query.ExpressionQuery<T>
-
- All Implemented Interfaces:
IQueryWithIndex<T>
,IQuery<T>
public class ExpressionQuery<T> extends Object implements IQueryWithIndex<T>
A query that evaluates using an iterator as input and produces a new iterator.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description ExpressionQuery(Class<? extends T> matchingClass, String expression, Object... parameters)
ExpressionQuery(Class<? extends T> elementClass, IExpression expression, Object... parameters)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> IContextExpression<T>
createExpression(IQuery<T> query)
Class<? extends T>
getElementClass()
static <T> Class<? extends T>
getElementClass(IQuery<T> query)
IContextExpression<T>
getExpression()
Returns the IExpression backing this query ornull
if this is not an expression query.IQueryResult<T>
perform(Iterator<T> iterator)
Evaluates the query for a specific input.IQueryResult<T>
perform(IIndexProvider<T> indexProvider)
Evaluates the query using theindexProvider
.
-
-
-
Method Detail
-
perform
public IQueryResult<T> perform(IIndexProvider<T> indexProvider)
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
public IQueryResult<T> perform(Iterator<T> iterator)
Description copied from interface:IQuery
Evaluates the query for a specific input.
-
getExpression
public IContextExpression<T> 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
.
-
createExpression
public static <T> IContextExpression<T> createExpression(IQuery<T> query)
-
-