public static class HopeLangParser.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
HopeLangParser.Builder |
addPackage(String userPackage)
Add a package that will be scanned besides stdlib for implementations of
HopeFunction |
HopeLangParser |
build()
Build a Hope language parser
|
HopeLangParser.Builder |
errorHandlingStrategy(io.appform.hope.core.exceptions.errorstrategy.ErrorHandlingStrategy errorHandlingStrategy)
Override error handling strategy.
|
HopeLangParser.Builder |
registerFunction(Class<? extends io.appform.hope.core.functions.HopeFunction> hopeFunctionClass)
Register a
HopeFunction implementation directly to the function registry |
public HopeLangParser.Builder addPackage(String userPackage)
HopeFunctionuserPackage - package to be scannedpublic HopeLangParser.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 HopeLangParser.Builder errorHandlingStrategy(io.appform.hope.core.exceptions.errorstrategy.ErrorHandlingStrategy errorHandlingStrategy)
DefaultErrorHandlingStrategy.
Can also be InjectValueErrorHandlingStrategy
or something custom.errorHandlingStrategy - Error handling strategypublic HopeLangParser build()
Copyright © 2019. All rights reserved.