|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExpressionFactory
This interface specifies the methods needed to create all of the expressions supported by the message selector. It exists solely to decouple the expression evaluation classes from the parser.
Expression
,
SelectorTokenTypes
,
SelectorTreeParser
Method Summary | |
---|---|
Expression |
between(Expression num1,
Expression num2,
Expression num3)
Create a 'between' expression that returns the result of: num1 >= num2 and num1 <= num3
when evaluated |
Expression |
binaryOperator(int operator,
Expression left,
Expression right)
Create a binary operator expression |
Expression |
identifier(java.lang.String name)
Create an identifier expression |
Expression |
in(Expression identifier,
java.util.HashSet set)
Create an 'in' expression |
Expression |
isNull(Expression identifier)
Create an 'is null' expression |
Expression |
like(Expression identifier,
java.lang.String pattern,
java.lang.String escape)
Create a 'like' expression |
Expression |
literal(int type,
java.lang.String text)
Create a literal expression |
Expression |
unaryOperator(int operator,
Expression operand)
Create an unary operator expression |
Method Detail |
---|
Expression binaryOperator(int operator, Expression left, Expression right) throws SelectorException
operator
- the operator token type from SelectorTokenTypesleft
- the left-hand side of the binary expressionright
- the right-hand side of the binary expression
SelectorException
- if the operator is not a valid binary operatorExpression unaryOperator(int operator, Expression operand) throws SelectorException
operator
- the operator token type from SelectorTokenTypesoperand
- the expression to apply the operator to
SelectorException
- if the operator is not a valid unary operatorExpression identifier(java.lang.String name) throws SelectorException
name
- the name of the identifier
SelectorException
- is name is not a valid identifierExpression isNull(Expression identifier) throws SelectorException
identifier
- the identifer expression to apply the 'is null' test
SelectorException
- for any errorExpression like(Expression identifier, java.lang.String pattern, java.lang.String escape) throws SelectorException
identifier
- the identifer to apply the 'like' test topattern
- the search patternescape
- the escape character. This may be null
SelectorException
- if the pattern or escape is invalidExpression between(Expression num1, Expression num2, Expression num3) throws SelectorException
num1 >= num2 and num1 <= num3
when evaluated
num1
- an arithmethic expressionnum2
- an arithmethic expressionnum3
- an arithmethic expression
SelectorException
- for any errorExpression in(Expression identifier, java.util.HashSet set) throws SelectorException
identifier
- string identifer to apply the 'in' test toset
- the set of string values to compare against
SelectorException
- for any errorExpression literal(int type, java.lang.String text) throws SelectorException
type
- the operator token type from SelectorTokenTypestext
- the literal text
SelectorException
- if type is not a valid literal type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |