vertx / io.vertx.core.cli.converters / FromBasedConverter

# FromBasedConverter

`class FromBasedConverter<T : Any> : Converter<T>`

This 'default' converter tries to create objects using a static 'from' method taking a single String argument. This converter is particularly convenient for builders.

### Parameters

`` - the built type.

Author
Clement Escoffier

### Properties

FROM | `static val FROM: String`

### Functions

fromString | `fun fromString(input: String): T` Converts the given input to an object by using the 'from' method. Notice that the method may receive a null value.
getIfEligible | `static fun <T : Any> getIfEligible(clazz: Class<T>): FromBasedConverter<T>` Checks whether the given class can be used by the FromBasedConverter (i.e. has a static 'from' method taking a single String as argument). If so, creates a new instance of converter for this type.