value-processor / me.tatarka.valueprocessor / ValueCreator

ValueCreator

class ValueCreator

Creates instances of Value from various starting elements.

Constructors

<init>

ValueCreator(env: ProcessingEnvironment)

Creates instances of Value from various starting elements.

Functions

from

fun from(element: Element, isBuilder: Boolean = false): Value

Creates a Value from the given element. This element can be the TypeElement of the target class, or a specific constructor or factory method. If isBuilder is true, then the element represents the builder class, constructor or factory method.

fromBuilderClass

fun fromBuilderClass(builderClass: TypeElement): Value

Creates a Value from the given builder class. ex:

fromBuilderConstructor

fun fromBuilderConstructor(constructor: ExecutableElement): Value

Creates a Value from the given builder's constructor element. ex:

fromBuilderFactory

fun fromBuilderFactory(builderFactory: ExecutableElement): Value

Creates a Value from the given builder factory method element. ex:

fromClass

fun fromClass(targetClass: TypeElement): Value

Creates a Value from the given class. ex:

fromConstructor

fun fromConstructor(constructor: ExecutableElement): Value

Creates a Value from the given constructor element. ex:

fromFactory

fun fromFactory(factory: ExecutableElement): Value

Creates a Value from the given factory method element. ex: