Class ParserFactory
- java.lang.Object
-
- com.aquima.interactions.rule.impl.ParserFactory
-
- All Implemented Interfaces:
IParserFactory
public class ParserFactory extends Object implements IParserFactory
Default parser factory class that can be used to create expression parsers with optional error reporting.- Since:
- 5.1
- Author:
- O. Kerpershoek
-
-
Constructor Summary
Constructors Constructor Description ParserFactory(IProject project, IMetaModel model, IExpressionEngineDS datasource, Version parserVersion)
Constructs the parser factory for the specified meta model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IExpressionParser
getParser(String unitName, IParseListener listener)
This method returns an expression parser that will use the specified listener when parsing expressions.
-
-
-
Constructor Detail
-
ParserFactory
public ParserFactory(IProject project, IMetaModel model, IExpressionEngineDS datasource, Version parserVersion) throws InitializationException
Constructs the parser factory for the specified meta model.- Parameters:
project
- Project containing various global definitions.model
- The meta model that should be used by the expression parsers.datasource
- The data source from which the expression templates are retrieved.parserVersion
- The version of the parser that should be used.- Throws:
InitializationException
- When there was a problem during construction of the parser factory.
-
-
Method Detail
-
getParser
public IExpressionParser getParser(String unitName, IParseListener listener)
Description copied from interface:IParserFactory
This method returns an expression parser that will use the specified listener when parsing expressions. The parse listener is optional, and may be omitted by calling this method with a null value.- Specified by:
getParser
in interfaceIParserFactory
- Parameters:
unitName
- Identifier for the expression(s) that will be parsed by this parser.listener
- Optional listener that will be notified of errors and warnings.- Returns:
- An expression parser implementation.
-
-