Interface used to define a ResolutionStrategy.
Interface used to define a TypeHelper.
Interface used to define a TypeHelper.
Given a type (T), the TypeHelper is expected to be able
class StringTypeHelper extends TypeHelper { private val stringExtractor: Input => Any = x => x.config.getString(x.configKey.get) override def canHandle(objType: universe.Type): Boolean = objType.typeSymbol==universe.typeOf[String].typeSymbol override def get(objType: universe.Type): Input => Any = stringExtractor }
More example are available under com.github.kiran002.kissconfig.config.impl
Static Wrapper for ResolutionStrategy that can used to register new implementation of Resolution Strategy during runtime
Static Wrapper for ResolutionStrategy that can used to register new implementation of Resolution Strategy during runtime
Maximum one resolution strategy is supported at a time If no Resolution Strategy is provided the fieldname is used as the config key
Static Wrapper for TypeHelper that can used to register new implementation of TypeHelper during runtime
Static Wrapper for TypeHelper that can used to register new implementation of TypeHelper during runtime
Any Number of TypeHelper can be registered, the helper registered latest has the highest precedence when executing
Interface used to define a ResolutionStrategy.
Naming conventions can be different going from scala to hocon config. ResolutionStrategy defines the api that is used for the translation of scala field names to hocon config keys
This example shows how to define a simple
AddB
resolution strategy. The resolution strategy simply adds 'B' to the end fo the field name.More example are available under com.github.kiran002.kissconfig.config.impl.ResolutionStrategies
,This is only an example for how to define a resolution strategy, this should never be used in your application.