|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface provides methods for factorizing expression nodes. Expression nodes are used as filter expressions for query trees.
| Method Summary | |
AndExpression |
newAnd(Expression left,
Expression right)
Returns an and expression for the arguments left and right. |
CastExpression |
newCast(java.lang.Class clazz,
Expression expression)
Returns an instance of CastExpression. |
ComplementExpression |
newComplement(Expression expr)
Returns a complement expression for the argument expr. |
ConditionalAndExpression |
newConditionalAnd(Expression left,
Expression right)
Returns a conditional and expression for the arguments left and right. |
ConditionalOrExpression |
newConditionalOr(Expression left,
Expression right)
Returns a conditional or expression for the arguments left and right. |
ConstantExpression |
newConstant(boolean b)
Returns an instance of BooleanLiteralExpression. |
ConstantExpression |
newConstant(byte b)
Returns an instance of ByteLiteralExpression. |
ConstantExpression |
newConstant(char c)
Returns an instance of CharLiteralExpression. |
ConstantExpression |
newConstant(double d)
Returns an instance of DoubleLiteralExpression. |
ConstantExpression |
newConstant(float f)
Returns an instance of FloatLiteralExpression. |
ConstantExpression |
newConstant(int i)
Returns an instance of IntLiteralExpression. |
ConstantExpression |
newConstant(long l)
Returns an instance of LongLiteralExpression. |
ConstantExpression |
newConstant(java.lang.Object value)
Returns an instance of ConstantExpression. |
ConstantExpression |
newConstant(short s)
Returns an instance of ShortLiteralExpression. |
DivideExpression |
newDivide(Expression left,
Expression right)
Returns a divide expression for the arguments left and right. |
EqualsExpression |
newEquals(Expression left,
Expression right)
Returns an equals expression for the arguments left and right. |
StaticFieldAccessExpression |
newFieldAccess(java.lang.Class clazz,
java.lang.String fieldName)
Returns an instance of StaticFieldAccessExpression. |
FieldAccessExpression |
newFieldAccess(Expression target,
java.lang.String fieldName)
Returns an instance of FieldAccessExpression. |
GreaterThanExpression |
newGreaterThan(Expression left,
Expression right)
Returns a greater than expression for the arguments left and right. |
GreaterThanEqualsExpression |
newGreaterThanEquals(Expression left,
Expression right)
Returns a greater than equals expression for the arguments left and right. |
IdentifierExpression |
newIdentifier(java.lang.String identifier)
The implementation may decide to create an instance of FieldAccessExpression,
VariableAccessExpression or
ParameterAccessExpression depending on the fact
whether the argument corresponds with a parameter, variable or
a field of the candidate class. |
LessThanExpression |
newLessThan(Expression left,
Expression right)
Returns a less than expression for the arguments left and right. |
LessThanEqualsExpression |
newLessThanEquals(Expression left,
Expression right)
Returns a less than equals expression for the arguments left and right. |
MethodCallExpression |
newMethodCall(Expression target,
java.lang.String methodName,
Expression[] arguments)
The implementation may decide to create a specialized instance of MethodCallExpression (for example,
ContainsCallExpression)
depending on the argument methodName. |
UnaryMinusExpression |
newMinus(Expression expr)
Returns a unary minus expression for the argument expr. |
MinusExpression |
newMinus(Expression left,
Expression right)
Returns a minus expression for the arguments left and right. |
NotExpression |
newNot(Expression expr)
Returns a not expression for the argument expr. |
NotEqualsExpression |
newNotEquals(Expression left,
Expression right)
Returns a not equals expression for the arguments left and right. |
OrExpression |
newOr(Expression left,
Expression right)
Returns an or expression for the arguments left and right. |
UnaryPlusExpression |
newPlus(Expression expr)
Returns a plus expression for the argument expr. |
PlusExpression |
newPlus(Expression left,
Expression right)
Returns a plus expression for the arguments left and right. |
TimesExpression |
newTimes(Expression left,
Expression right)
Returns a times expression for the arguments left and right. |
| Method Detail |
public IdentifierExpression newIdentifier(java.lang.String identifier)
FieldAccessExpression,
VariableAccessExpression or
ParameterAccessExpression depending on the fact
whether the argument corresponds with a parameter, variable or
a field of the candidate class. Optionally, the implementation
may return an instance of IdentifierExpression
which later may be replaced with its specialized counterpart
semantically analysing a query tree.
identifier - the name of the identifier access expression
public FieldAccessExpression newFieldAccess(Expression target,
java.lang.String fieldName)
FieldAccessExpression.
target - the target expression of the field access expressionfieldName - the name of the field to access
public StaticFieldAccessExpression newFieldAccess(java.lang.Class clazz,
java.lang.String fieldName)
StaticFieldAccessExpression.
clazz - the class instance defining the fieldfieldName - the name of the field to access
public MethodCallExpression newMethodCall(Expression target,
java.lang.String methodName,
Expression[] arguments)
MethodCallExpression (for example,
ContainsCallExpression)
depending on the argument methodName.
Optionally, the implementation may return an instance of
MethodCallExpression
which later may be replaced with its specialized counterpart
semantically analysing a query tree.
target - the target expression of the method call expressionmethodName - the name of the methodarguments - the array of arguments
public CastExpression newCast(java.lang.Class clazz,
Expression expression)
CastExpression.
clazz - the Java class to cast the argument
expression toexpression - the expression to cast
public ConstantExpression newConstant(boolean b)
BooleanLiteralExpression.
b - the value wrapped by the boolean expression
public ConstantExpression newConstant(byte b)
ByteLiteralExpression.
b - the value wrapped by the byte expression
public ConstantExpression newConstant(char c)
CharLiteralExpression.
c - the value wrapped by the char expression
public ConstantExpression newConstant(double d)
DoubleLiteralExpression.
d - the value wrapped by the double expression
public ConstantExpression newConstant(float f)
FloatLiteralExpression.
f - the value wrapped by the float expression
public ConstantExpression newConstant(int i)
IntLiteralExpression.
i - the value wrapped by the int expression
public ConstantExpression newConstant(long l)
LongLiteralExpression.
l - the value wrapped by the long expression
public ConstantExpression newConstant(short s)
ShortLiteralExpression.
s - the value wrapped by the short expression
public ConstantExpression newConstant(java.lang.Object value)
ConstantExpression.
This method handles null as a constant expression.
value - the object wrapped by the constant expression
public ComplementExpression newComplement(Expression expr)
expr.
expr - the expression argument for the operation
public UnaryMinusExpression newMinus(Expression expr)
expr.
expr - the expression argument for the operation
public NotExpression newNot(Expression expr)
expr.
expr - the expression argument for the operation
public UnaryPlusExpression newPlus(Expression expr)
expr.
expr - the expression argument for the operation
public AndExpression newAnd(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public ConditionalAndExpression newConditionalAnd(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public ConditionalOrExpression newConditionalOr(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public DivideExpression newDivide(Expression left,
Expression right)
left and right.
This method throws NullPointerException if one of
the arguments left or right are
null.
left - the left expression argument for the operationright - the right expression argument for the operation
public EqualsExpression newEquals(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public GreaterThanExpression newGreaterThan(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public GreaterThanEqualsExpression newGreaterThanEquals(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public LessThanExpression newLessThan(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public LessThanEqualsExpression newLessThanEquals(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public MinusExpression newMinus(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public NotEqualsExpression newNotEquals(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public PlusExpression newPlus(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
public OrExpression newOr(Expression left,
Expression right)
left and right.
This method throws NullPointerException if one of
the arguments left or right are
null.
left - the left expression argument for the operationright - the right expression argument for the operation
public TimesExpression newTimes(Expression left,
Expression right)
left and right.
left - the left expression argument for the operationright - the right expression argument for the operation
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||