DefaultHandlers

A registry of DefaultHandler instances for different types.

This object holds the mapping of supported types to their corresponding parsers used when applying default values via the net.ririfa.yacla.annotation.Default annotation.

The registry includes built-in handlers for common primitive types (String, Boolean, Int, etc.) and allows registering additional custom handlers for other types.

Example:

DefaultHandlers.register(MyType::class.java) { raw, _ -> MyType.parse(raw) }

Functions

Link copied to clipboard
fun get(type: Class<*>): DefaultHandler?

Retrieves the registered DefaultHandler for the given type, or null if none registered.

Link copied to clipboard
fun register(type: Class<*>, handler: DefaultHandler)
Link copied to clipboard

Registers the default handlers for common primitive types.