DynamicType

data class DynamicType(val name: String, val description: String = name, val ownProperties: List<PropertyDefinition> = emptyList(), val parents: List<DomainType> = emptyList(), val creationPermitted: Boolean = true) : DomainType

Simple data type. Enables interop with non-JVM types.

Parameters

name

name of the type. Should be unique within a given context

description

description of the type

ownProperties

properties directly on the type, versus inherited properties

parents

parent types of this type. Can be JVM types or dynamic types

Constructors

Link copied to clipboard
constructor(name: String, description: String = name, ownProperties: List<PropertyDefinition> = emptyList(), parents: List<DomainType> = emptyList(), creationPermitted: Boolean = true)

Properties

Link copied to clipboard
open override val creationPermitted: Boolean = true

Is instance creation permitted? Or is this reference data?

Link copied to clipboard
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 name: String
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
Link copied to clipboard
open override val parents: List<DomainType>
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
open override fun children(additionalBasePackages: Collection<String>): 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
open fun infoString(verbose: Boolean?, indent: Int): String
Link copied to clipboard
open override fun isAssignableFrom(other: DomainType): Boolean
open override fun isAssignableFrom(other: Class<*>): Boolean
Link copied to clipboard
open override fun isAssignableTo(other: DomainType): Boolean
open override fun isAssignableTo(other: Class<*>): Boolean
Link copied to clipboard