Package org.drools.drl.parser.lang.dsl
Class DefaultExpanderResolver
java.lang.Object
org.drools.drl.parser.lang.dsl.DefaultExpanderResolver
- All Implemented Interfaces:
ExpanderResolver
The default expander resolver will provide instances of the DefaultExpander.
The DefaultExpander uses templates to provide DSL and pseudo
natural language support.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an empty resolver, which you will then call addExpander multiple times, to map a specific expander with a name that will be found in the drl after the expander keyword.DefaultExpanderResolver(Reader reader) This will load up a DSL from the reader specified. -
Method Summary
-
Constructor Details
-
DefaultExpanderResolver
public DefaultExpanderResolver()Create an empty resolver, which you will then call addExpander multiple times, to map a specific expander with a name that will be found in the drl after the expander keyword. -
DefaultExpanderResolver
This will load up a DSL from the reader specified. This will make the expander available to any parser regardless of name. The DSL expander will be the default expander. This is the constructor most people should use.- Throws:
IOException
-
-
Method Details
-
addExpander
Add an expander with the given name, which will be used by looking for the "expander" keyword in the DRL. If a default expander is installed, it will always be returned if none matching the given name can be found. You don't need to use this unless you have multiple expanders/DSLs involved when compiling multiple rule packages at the same time. If you don't know what that sentence means, you probably don't need to use this method. -
get
- Specified by:
getin interfaceExpanderResolver
-