ConverterBuilderClassBuilder

class ConverterBuilderClassBuilder : KoinComponent

Builder class that itself builds converter builder classes. Meta, I know.

This is a fairly messy class containing a string builder, but what can you do?

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
lateinit var argumentType: String

Argument type, the type the user should ultimately be given after parsing.

Link copied to clipboard

Builder generic params, if any. Omit the <>.

Link copied to clipboard

Comment to prepend to the class definition.

Link copied to clipboard
lateinit var converterClass: String

Converter class - class that should be instantiated to construct the converter.

Link copied to clipboard
lateinit var name: String

Converter name - eg, "${name}ConverterBuilder".

Link copied to clipboard

The ultimate result, the final string created after calling build.

Link copied to clipboard

Extra generic bounds to place after where in the builder signature.

Functions

Link copied to clipboard
fun build(): String

Build the string that contains this builder's code. It's also stored in result.

Link copied to clipboard
fun builderArg(arg: String)

Add a builder constructor argument.

Link copied to clipboard

Add a builder build function statement.

Link copied to clipboard

Add a builder build function statement.

Link copied to clipboard

Add a builder extra statement.

Link copied to clipboard
fun builderField(field: String)

Add a builder field.

Link copied to clipboard

Add a builder init statement.

Link copied to clipboard
open fun getKoin(): Koin
Link copied to clipboard
fun types(vararg types: ConverterType)

Specify the converter types that this builder concerns.