|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.equinox.p2.metadata.expression.ExpressionUtil
public final class ExpressionUtil
Global access to factory, parser, and methods for introspection
| Field Summary | |
|---|---|
static IExpression |
FALSE_EXPRESSION
|
static IExpression |
TRUE_EXPRESSION
|
| Method Summary | |
|---|---|
static IExpressionFactory |
getFactory()
Returns the global expression factory |
static IExpression |
getLHS(IExpression expression)
Obtains the Left Hand Side (LHS) of a binary expression. |
static java.lang.String |
getName(IExpression expression)
Obtains the name of a variable or member expression. |
static IExpression |
getOperand(IExpression expression)
Obtains the operand of an unary expression |
static IExpression[] |
getOperands(IExpression expression)
Obtains the operands of an n-ary expression |
static IExpressionParser |
getParser()
Creates and returns a new expression parser |
static IExpression |
getRHS(IExpression expression)
Obtains the Right Hand Side (RHS) of a binary expression. |
static java.lang.Object |
getValue(IExpression expression)
Obtains the value of a literal expression |
static IExpression |
parse(java.lang.String expression)
Create a new expression. |
static IFilterExpression |
parseLDAP(java.lang.String filter)
Parse an LDAP filter from the filter string. |
static IExpression |
parseQuery(java.lang.String expression)
Create an arbitrary expression. |
static java.lang.String |
trimmedOrNull(java.lang.String str)
If str is null, then this method returns null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final IExpression TRUE_EXPRESSION
public static final IExpression FALSE_EXPRESSION
| Method Detail |
|---|
public static IExpressionFactory getFactory()
public static IExpressionParser getParser()
public static IFilterExpression parseLDAP(java.lang.String filter)
throws java.lang.IllegalArgumentException
filter string. If filter is null
or a string that is empty or only consists of whitespace, then this method returns null.
filter - The filter to parse. Can be null or empty.
null.
ExpressionParseException - If the syntax was invalid
java.lang.IllegalArgumentExceptionpublic static IExpression parse(java.lang.String expression)
expression - The string representing the boolean expression.
ExpressionParseException - If the syntax was invalidpublic static IExpression parseQuery(java.lang.String expression)
expression - The string representing the boolean expression.
ExpressionParseException - If the syntax was invalidpublic static java.lang.String trimmedOrNull(java.lang.String str)
str is null, then this method returns null.
Otherwise str is trimmed from whitespace at both ends. If the result
of the trim is an empty string, then null is returned, otherwise the
result of the trim is returned.
str - The string to trim. Can be null.
null.public static IExpression getLHS(IExpression expression)
expression - The expression to introspect
java.lang.IllegalArgumentException - if the expression is not a binary expressionIExpression.TYPE_AT,
IExpression.TYPE_EQUALS,
IExpression.TYPE_GREATER,
IExpression.TYPE_GREATER_EQUAL,
IExpression.TYPE_LESS,
IExpression.TYPE_LESS_EQUAL,
IExpression.TYPE_MATCHES,
IExpression.TYPE_NOT_EQUALSpublic static java.lang.String getName(IExpression expression)
expression - The expression to introspect
java.lang.IllegalArgumentException - if the expression is not a variable or a memberIExpression.TYPE_MEMBER,
IExpression.TYPE_VARIABLEpublic static IExpression getOperand(IExpression expression)
expression - The expression to introspect
java.lang.IllegalArgumentException - if the expression is not an unary expressionIExpression.TYPE_ALL,
IExpression.TYPE_EXISTS,
IExpression.TYPE_LAMBDA,
IExpression.TYPE_NOTpublic static IExpression[] getOperands(IExpression expression)
expression - The expression to introspect
java.lang.IllegalArgumentException - if the expression is not a n-ary expressionIExpression.TYPE_AND,
IExpression.TYPE_ORpublic static IExpression getRHS(IExpression expression)
expression - The expression to introspect
java.lang.IllegalArgumentException - if the expression is not a binary expressionIExpression.TYPE_AT,
IExpression.TYPE_EQUALS,
IExpression.TYPE_GREATER,
IExpression.TYPE_GREATER_EQUAL,
IExpression.TYPE_LESS,
IExpression.TYPE_LESS_EQUAL,
IExpression.TYPE_MATCHES,
IExpression.TYPE_NOT_EQUALSpublic static java.lang.Object getValue(IExpression expression)
expression - The expression to introspect
java.lang.IllegalArgumentException - if the expression is not a literalIExpression.TYPE_LITERAL
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.