Factory

abstract class Factory<E : Entity<E>> : TypeReference<E> (source)

Abstract factory used to create entity objects, typically declared as companion objects of entity classes.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The actual kotlin type argument of subclass without erased.

Link copied to clipboard

The actual type argument of subclass without erased.

Functions

Link copied to clipboard
operator fun invoke(): E

Overload the invoke operator, creating an entity object just like there is a constructor.

inline operator fun invoke(init: E.() -> Unit): E

Overload the invoke operator, creating an entity object and call the init function.