value-processor / me.tatarka.valueprocessor / ConstructionSource

ConstructionSource

sealed class ConstructionSource

How a Value can be constructed. Either a constructor, factory method, or builder.

Types

Builder

abstract class Builder : ConstructionSource

BuilderConstructor

class BuilderConstructor : Builder

BuilderFactory

class BuilderFactory : Builder

Constructor

class Constructor : ConstructionSource

A Value constructor.

Factory

class Factory : ConstructionSource

A Value factory method.

Properties

constructionElement

abstract val constructionElement: ExecutableElement

The executable element to construct the Value. This may be a constructor, factory method, or builder.

isBuilder

abstract val isBuilder: Boolean

If this source is a builder.

isConstructor

abstract val isConstructor: Boolean

If this source is a constructor (either of the value or the builder).

targetClass

abstract val targetClass: TypeElement

The target Value class to construct.

Functions

findBuildMethod

fun findBuildMethod(builderClass: TypeElement): ExecutableElement?

Inheritors

Builder

abstract class Builder : ConstructionSource

Constructor

class Constructor : ConstructionSource

A Value constructor.

Factory

class Factory : ConstructionSource

A Value factory method.