Eclipse Platform
Release 3.6

org.eclipse.equinox.p2.metadata.expression
Interface IExpression

All Known Subinterfaces:
IContextExpression<T>, IFilterExpression, IMatchExpression<T>, IQLExpression

public interface IExpression

A node in the expression tree

Since:
2.0

Field Summary
static int TYPE_ALL
           
static int TYPE_AND
           
static int TYPE_AT
           
static int TYPE_EQUALS
           
static int TYPE_EXISTS
           
static int TYPE_GREATER
           
static int TYPE_GREATER_EQUAL
           
static int TYPE_LAMBDA
           
static int TYPE_LESS
           
static int TYPE_LESS_EQUAL
           
static int TYPE_LITERAL
           
static int TYPE_MATCHES
           
static int TYPE_MEMBER
           
static int TYPE_NOT
           
static int TYPE_NOT_EQUALS
           
static int TYPE_OR
           
static int TYPE_PARAMETER
           
static int TYPE_VARIABLE
           
 
Method Summary
 boolean accept(IExpressionVisitor visitor)
          Let the visitor visit this instance and all expressions that this instance contains.
 Object evaluate(IEvaluationContext context)
          Evaluate this expression with given context and variables.
 int getExpressionType()
          Returns the expression type (see TYPE_xxx constants).
 void toLDAPString(StringBuffer collector)
          Appends the an LDAP filter representation of this expression to the collector.
 void toString(StringBuffer collector)
          Appends the string representation of this expression to the collector collector.
 

Field Detail

TYPE_ALL

static final int TYPE_ALL
See Also:
Constant Field Values

TYPE_AND

static final int TYPE_AND
See Also:
Constant Field Values

TYPE_AT

static final int TYPE_AT
See Also:
Constant Field Values

TYPE_EQUALS

static final int TYPE_EQUALS
See Also:
Constant Field Values

TYPE_EXISTS

static final int TYPE_EXISTS
See Also:
Constant Field Values

TYPE_GREATER

static final int TYPE_GREATER
See Also:
Constant Field Values

TYPE_GREATER_EQUAL

static final int TYPE_GREATER_EQUAL
See Also:
Constant Field Values

TYPE_LAMBDA

static final int TYPE_LAMBDA
See Also:
Constant Field Values

TYPE_LESS

static final int TYPE_LESS
See Also:
Constant Field Values

TYPE_LESS_EQUAL

static final int TYPE_LESS_EQUAL
See Also:
Constant Field Values

TYPE_LITERAL

static final int TYPE_LITERAL
See Also:
Constant Field Values

TYPE_MATCHES

static final int TYPE_MATCHES
See Also:
Constant Field Values

TYPE_MEMBER

static final int TYPE_MEMBER
See Also:
Constant Field Values

TYPE_NOT

static final int TYPE_NOT
See Also:
Constant Field Values

TYPE_NOT_EQUALS

static final int TYPE_NOT_EQUALS
See Also:
Constant Field Values

TYPE_OR

static final int TYPE_OR
See Also:
Constant Field Values

TYPE_PARAMETER

static final int TYPE_PARAMETER
See Also:
Constant Field Values

TYPE_VARIABLE

static final int TYPE_VARIABLE
See Also:
Constant Field Values
Method Detail

accept

boolean accept(IExpressionVisitor visitor)
Let the visitor visit this instance and all expressions that this instance contains.

Parameters:
visitor - The visiting visitor.
Returns:
true if the visitor should continue visiting, false otherwise.

evaluate

Object evaluate(IEvaluationContext context)
Evaluate this expression with given context and variables.

Parameters:
context - The evaluation context
Returns:
The result of the evaluation.

getExpressionType

int getExpressionType()
Returns the expression type (see TYPE_xxx constants).


toString

void toString(StringBuffer collector)
Appends the string representation of this expression to the collector collector.


toLDAPString

void toLDAPString(StringBuffer collector)
Appends the an LDAP filter representation of this expression to the collector.

Throws:
UnsupportedOperationException - if the expression contains nodes that cannot be represented in an LDAP filter

Eclipse Platform
Release 3.6

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.