public static class HopeLangEngine.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
HopeLangEngine.Builder |
addPackage(String userPackage)
Add a package that will be scanned besides stdlib for implementations of
HopeFunction |
HopeLangEngine |
build()
Build a Hope language parser
|
HopeLangEngine.Builder |
errorHandlingStrategy(io.appform.hope.core.exceptions.errorstrategy.ErrorHandlingStrategy errorHandlingStrategy)
Override error handling strategy.
|
HopeLangEngine.Builder |
registerFunction(Class<? extends io.appform.hope.core.functions.HopeFunction> hopeFunctionClass)
Register a
HopeFunction implementation directly to the function registry |
public HopeLangEngine.Builder addPackage(String userPackage)
HopeFunctionuserPackage - package to be scannedpublic HopeLangEngine.Builder registerFunction(Class<? extends io.appform.hope.core.functions.HopeFunction> hopeFunctionClass)
HopeFunction implementation directly to the function registryhopeFunctionClass - Implementation of HopeFunction.
Needs to be annotated with FunctionImplementation
and have a constructor only having zero or more Value
as params.public HopeLangEngine.Builder errorHandlingStrategy(io.appform.hope.core.exceptions.errorstrategy.ErrorHandlingStrategy errorHandlingStrategy)
DefaultErrorHandlingStrategy.
Can also be InjectValueErrorHandlingStrategy
or something custom.errorHandlingStrategy - Error handling strategypublic HopeLangEngine build()
Copyright © 2019. All rights reserved.