Package org.drools.drl.parser.lang.dsl
Class DefaultExpander
- java.lang.Object
-
- org.drools.drl.parser.lang.dsl.DefaultExpander
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description DefaultExpander()Creates a new DefaultExpander
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDSLMapping(DSLMapping mapping)Add the new mapping to this expander.Stringexpand(Reader drlReader)Expands (process) the expression Just-In-Time for the parser.Stringexpand(String drl)Expands (process) the expression Just-In-Time for the parser.List<ExpanderException>getErrors()Returns the list of errors from the last expansion madebooleanhasErrors()Returns true in case the last expansion had any errors
-
-
-
Method Detail
-
addDSLMapping
public void addDSLMapping(DSLMapping mapping)
Add the new mapping to this expander.- Specified by:
addDSLMappingin interfaceExpander- Parameters:
mapping-
-
expand
public String expand(Reader drlReader) throws IOException
Description copied from interface:ExpanderExpands (process) the expression Just-In-Time for the parser. If the source is not meant to be expanded, or if no appropriate match was found for expansion, it will echo back the same expression.- Specified by:
expandin interfaceExpander- Parameters:
drlReader- the source code to be pre-processed- Returns:
- source code after running pre-processors
- Throws:
IOException
-
expand
public String expand(String drl)
Description copied from interface:ExpanderExpands (process) the expression Just-In-Time for the parser. If the source is not meant to be expanded, or if no appropriate match was found for expansion, it will echo back the same expression.
-
getErrors
public List<ExpanderException> getErrors()
Description copied from interface:ExpanderReturns the list of errors from the last expansion made
-
-