public final class TargetLiteral<NODE_TYPE> extends QueryExpression<NODE_TYPE>
expr ::= WORD
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object another)
This instance is equal to all instances of
TargetLiteral that have equal attribute
values. |
<OUTPUT_TYPE extends QueryTarget> |
eval(QueryEvaluator<NODE_TYPE> evaluator,
QueryEnvironment<NODE_TYPE> env)
Evaluates this query in the specified environment, and returns a (possibly-immutable) set of
targets.
|
String |
getPattern() |
int |
hashCode() |
static <T> TargetLiteral<T> |
of(String pattern)
Construct a new immutable
TargetLiteral instance. |
String |
toString()
Returns this query expression pretty-printed.
|
void |
traverse(com.facebook.buck.query.QueryExpression.Visitor<NODE_TYPE> visitor)
Accepts and applies the given visitor.
|
collectTargetPatterns, getTargets, parse
public String getPattern()
pattern
attributepublic <OUTPUT_TYPE extends QueryTarget> Set<OUTPUT_TYPE> eval(QueryEvaluator<NODE_TYPE> evaluator, QueryEnvironment<NODE_TYPE> env) throws QueryException
QueryExpression
Failures resulting from evaluation of an ill-formed query cause QueryException to be thrown.
QueryException
public void traverse(com.facebook.buck.query.QueryExpression.Visitor<NODE_TYPE> visitor)
QueryExpression
traverse
in class QueryExpression<NODE_TYPE>
public String toString()
QueryExpression
toString
in class QueryExpression<NODE_TYPE>
public boolean equals(@Nullable Object another)
TargetLiteral
that have equal attribute
values.public static <T> TargetLiteral<T> of(String pattern)
TargetLiteral
instance.pattern
- The value for the pattern
attribute