org.jnetstream.filter
Interface FilterExpression<C>

All Known Implementing Classes:
PcapDebugFilter, PcapFilter

public interface FilterExpression<C>

A filter expression interface that can access the abstract syntax tree of the parsed expression in whatever syntax it was originally supplied.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
static class FilterExpression.FilterExpressionType
           
 
Method Summary
 C compile(FilterTarget target)
          Compiles the current expression for target and returns the compiled result
 java.lang.String getExpression()
          Gets the actual expression in form of a string that needs to be compiled or interpreted
 FilterExpression.FilterExpressionType getExpressionType()
          Returns the syntax in a form of enum constant that the expression string is in.
 

Method Detail

getExpressionType

FilterExpression.FilterExpressionType getExpressionType()
Returns the syntax in a form of enum constant that the expression string is in.

Returns:
name constant of the syntax of this filter expression

getExpression

java.lang.String getExpression()
Gets the actual expression in form of a string that needs to be compiled or interpreted

Returns:
the filter expression as a string

compile

C compile(FilterTarget target)
          throws FilterSyntaxError,
                 FilterNotFoundException
Compiles the current expression for target and returns the compiled result

Parameters:
target - target for which to compile the expression
Returns:
result of the compilation
Throws:
FilterSyntaxError - any Syntax errors generated during the expression
FilterNotFoundException