public class ContextExpression<T> extends Unary implements IContextExpression<T>
Expression.VariableFinder| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object[] |
parameters |
TYPE_ALL, TYPE_AND, TYPE_ARRAY, TYPE_ASSIGNMENT, TYPE_AT, TYPE_COLLECT, TYPE_CONDITION, TYPE_EQUALS, TYPE_EXISTS, TYPE_FIRST, TYPE_FLATTEN, TYPE_FUNCTION, TYPE_GREATER, TYPE_GREATER_EQUAL, TYPE_INTERSECT, TYPE_LAMBDA, TYPE_LATEST, TYPE_LESS, TYPE_LESS_EQUAL, TYPE_LIMIT, TYPE_LITERAL, TYPE_MATCHES, TYPE_MEMBER, TYPE_NOT, TYPE_NOT_EQUALS, TYPE_OR, TYPE_PARAMETER, TYPE_PIPE, TYPE_SELECT, TYPE_TRAVERSE, TYPE_UNION, TYPE_UNIQUE, TYPE_VARIABLEKEYWORD_ALL, KEYWORD_BOOLEAN, KEYWORD_CLASS, KEYWORD_COLLECT, KEYWORD_EXISTS, KEYWORD_FALSE, KEYWORD_FILTER, KEYWORD_FIRST, KEYWORD_FLATTEN, KEYWORD_INTERSECT, KEYWORD_IQUERY, KEYWORD_LATEST, KEYWORD_LIMIT, KEYWORD_LOCALIZED_KEYS, KEYWORD_LOCALIZED_MAP, KEYWORD_LOCALIZED_PROPERTY, KEYWORD_NULL, KEYWORD_RANGE, KEYWORD_SATISFIES_ALL, KEYWORD_SATISFIES_ANY, KEYWORD_SELECT, KEYWORD_SET, KEYWORD_TRAVERSE, KEYWORD_TRUE, KEYWORD_UNION, KEYWORD_UNIQUE, KEYWORD_VERSION, OPERATOR_AND, OPERATOR_ARRAY, OPERATOR_ASSIGN, OPERATOR_AT, OPERATOR_EACH, OPERATOR_ELSE, OPERATOR_EQUALS, OPERATOR_GT, OPERATOR_GT_EQUAL, OPERATOR_IF, OPERATOR_LT, OPERATOR_LT_EQUAL, OPERATOR_MATCHES, OPERATOR_MEMBER, OPERATOR_NOT, OPERATOR_NOT_EQUALS, OPERATOR_OR, OPERATOR_PARAMETER, PRIORITY_AND, PRIORITY_ASSIGNMENT, PRIORITY_BINARY, PRIORITY_COLLECTION, PRIORITY_COMMA, PRIORITY_CONDITION, PRIORITY_FUNCTION, PRIORITY_LAMBDA, PRIORITY_LITERAL, PRIORITY_MAX, PRIORITY_MEMBER, PRIORITY_NOT, PRIORITY_OR, PRIORITY_VARIABLE, VARIABLE_EVERYTHING, VARIABLE_THIS| Constructor and Description |
|---|
ContextExpression(Expression expression,
java.lang.Object[] parameters) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(IExpressionVisitor visitor)
Let the visitor visit this instance and all expressions that this
instance contains.
|
IEvaluationContext |
createContext(java.lang.Class<? extends T> elementClass,
IIndexProvider<T> indexProvider)
Creates a new context to be passed to a subsequent evaluation.
|
IEvaluationContext |
createContext(java.lang.Class<? extends T> elementClass,
java.util.Iterator<T> iterator)
Creates a new context to be passed to a subsequent evaluation.
|
java.lang.Object |
evaluate(IEvaluationContext context)
Evaluate this expression with given context and variables.
|
int |
getExpressionType()
Returns the expression type (see TYPE_xxx constants).
|
java.lang.String |
getOperator() |
java.lang.Object[] |
getParameters()
Returns the parameters that this context expression was created with.
|
int |
getPriority() |
int |
hashCode() |
java.util.Iterator<T> |
iterator(IEvaluationContext context)
Evaluate the expression and return the expected collection result as an iterator
|
void |
toString(java.lang.StringBuffer bld)
Appends the string representation of this expression to the collector
collector. |
void |
toString(java.lang.StringBuffer bld,
Variable rootVariable) |
compareTo, equals, getOperandappendOperand, assertLength, assertLength, compare, elementsToString, equals, evaluateAsIterator, getIndexCandidateMembers, hashCode, isReferenceTo, needsTranslationSupport, toLDAPString, toLDAPString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waittoLDAPStringpublic ContextExpression(Expression expression, java.lang.Object[] parameters)
public boolean accept(IExpressionVisitor visitor)
Expressionaccept in interface IExpressionaccept in class Unaryvisitor - The visiting visitor.true if the visitor should continue visiting, false otherwise.public void toString(java.lang.StringBuffer bld,
Variable rootVariable)
public IEvaluationContext createContext(java.lang.Class<? extends T> elementClass, IIndexProvider<T> indexProvider)
IContextExpressionCreates a new context to be passed to a subsequent evaluation. The context
will have the variable 'everything' set to an expression that represents
the everything iterator filtered for instances of elementClass.
The values of the iterator will be copied if necessary (when everything is referenced more then once).
createContext in interface IContextExpression<T>elementClass - the class of the iterator elementsindexProvider - The index provider that represents all queried material.public IEvaluationContext createContext(java.lang.Class<? extends T> elementClass, java.util.Iterator<T> iterator)
IContextExpressionCreates a new context to be passed to a subsequent evaluation. The context
will have the variable 'everything' set to an expression that represents
the everything iterator filtered for instances of elementClass.
The values of the iterator will be copied if necessary (when everything is referenced more then once).
createContext in interface IContextExpression<T>elementClass - the class of the iterator elementsiterator - The iterator that represents all queried material.public java.lang.Object evaluate(IEvaluationContext context)
Expressionevaluate in interface IExpressionevaluate in class Unarycontext - The evaluation contextpublic int getExpressionType()
IExpressiongetExpressionType in interface IExpressionpublic java.lang.String getOperator()
getOperator in class Expressionpublic int getPriority()
getPriority in class Expressionpublic java.lang.Object[] getParameters()
IContextExpressiongetParameters in interface IContextExpression<T>null.public java.util.Iterator<T> iterator(IEvaluationContext context)
IContextExpressioniterator in interface IContextExpression<T>context - The evaluation contextpublic void toString(java.lang.StringBuffer bld)
IExpressioncollector.toString in interface IExpressiontoString in class Expression