DomainType

sealed interface DomainType

Type known to the Embabel agent platform. May be backed by a domain object or ba dynamic type. Supports inheritance.

Inheritors

Properties

Link copied to clipboard

Is instance creation permitted? Or is this reference data?

Link copied to clipboard
open val labels: Set<String>

Get all labels for this type, including from parent types. For JvmType: simple class names of this type and all parent types. For DynamicType: capitalized value after last '.' in name, plus parent labels.

Link copied to clipboard
open val ownLabel: String

Get the label for this type only (not including parent labels) This will avoid long FQNs which are not useful for labeling.

Link copied to clipboard

Properties defined on this type only (not inherited)

Link copied to clipboard
abstract val parents: List<DomainType>

Supports inheritance

Link copied to clipboard

Get all properties, including inherited ones. Exposed even for JvmTypes, for consistency. Properties are deduplicated by name, with own properties taking precedence over inherited ones.

Link copied to clipboard

All relationship properties defined on this type and inherited ones

Link copied to clipboard

Value properties defined on this type and inherited ones

Functions

Link copied to clipboard
abstract fun children(additionalBasePackages: Collection<String> = listOf()): Collection<DomainType>

Get all descendant types from the classpath. For JvmType: scans the classpath for classes that extend or implement this type. For DynamicType: returns empty list as dynamic types don't have classpath descendants.

Link copied to clipboard
abstract fun isAssignableFrom(other: DomainType): Boolean
abstract fun isAssignableFrom(other: Class<*>): Boolean
Link copied to clipboard
abstract fun isAssignableTo(other: DomainType): Boolean
abstract fun isAssignableTo(other: Class<*>): Boolean