Package spoon.reflect.factory
Class QueryFactory
- java.lang.Object
-
- spoon.reflect.factory.SubFactory
-
- spoon.reflect.factory.QueryFactory
-
public class QueryFactory extends SubFactory
A factory to create some queries on the Spoon metamodel.
-
-
Field Summary
-
Fields inherited from class spoon.reflect.factory.SubFactory
factory
-
-
Constructor Summary
Constructors Constructor Description QueryFactory(Factory factory)
Creates the evaluation factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CtQuery
createQuery()
Creates a unbound query.CtQuery
createQuery(Iterable<?> inputs)
Creates a bound query.CtQuery
createQuery(Object input)
Creates a bound query.CtQuery
createQuery(Object... input)
Creates a bound query with an optional number of inputs elements to the query (seeCtQuery.setInput(Object...)
)
-
-
-
Constructor Detail
-
QueryFactory
public QueryFactory(Factory factory)
Creates the evaluation factory.
-
-
Method Detail
-
createQuery
public CtQuery createQuery()
Creates a unbound query. UseCtQuery.setInput(Object...)
beforeCtQuery.forEach(spoon.reflect.visitor.chain.CtConsumer)
orCtQuery.list()
is called
-
createQuery
public CtQuery createQuery(Object input)
Creates a bound query. Use directlyCtQuery.forEach(spoon.reflect.visitor.chain.CtConsumer)
orCtQuery.list()
to evaluate the query
-
createQuery
public CtQuery createQuery(Iterable<?> inputs)
Creates a bound query. Use directlyCtQuery.forEach(spoon.reflect.visitor.chain.CtConsumer)
orCtQuery.list()
to evaluate the query
-
createQuery
public CtQuery createQuery(Object... input)
Creates a bound query with an optional number of inputs elements to the query (seeCtQuery.setInput(Object...)
)
-
-