TemplateReference

data class TemplateReference(var templateUuid: String? = null, var capitalization: CapitalizationMode = DEFAULT_CAPITALIZATION, val affixDecorator: AffixDecorator = DEFAULT_AFFIX_DECORATOR, val arrayDecorator: ArrayDecorator = DEFAULT_ARRAY_DECORATOR) : Scheme(source)

A reference to an existing template, to allow using a template as if it were a scheme.

Constructors

Link copied to clipboard
constructor(templateUuid: String? = null, capitalization: CapitalizationMode = DEFAULT_CAPITALIZATION, affixDecorator: AffixDecorator = DEFAULT_AFFIX_DECORATOR, arrayDecorator: ArrayDecorator = DEFAULT_ARRAY_DECORATOR)

Types

Link copied to clipboard
object Companion

Holds constants.

Properties

Link copied to clipboard

The affixation to apply to the generated values.

Link copied to clipboard

Settings that determine whether the output should be an array of values.

Link copied to clipboard

The way in which the generated word should be capitalized.

Link copied to clipboard
open override val decorators: List<ArrayDecorator>

Additional logic that determines how strings are generated.

Link copied to clipboard
open override val icon: OverlayedIcon

The icon signifying this scheme in its entirety, or null if it does not have an icon.

Link copied to clipboard
open override val name: String

The name of the scheme as shown to the user.

Link copied to clipboard

The Template in the context's TemplateList that contains this TemplateReference.

Link copied to clipboard

The Template that is being referenced, or null if it could not be found in the context's TemplateList.

Link copied to clipboard
var templateUuid: String?

The UUID of the referenced template; defaults to the first template in TemplateList.

Link copied to clipboard
open override val typeIcon: TypeIcon

The icon signifying the type of data represented by this scheme, ignoring its decorators, or null if this scheme does not represent any kind of data, as is the case for DecoratorSchemes.

Functions

Link copied to clipboard
fun canReference(target: Template): Boolean

Returns true if and only if this would not be part of a cycle of recursive references in context after setting template to target.

Link copied to clipboard
open override fun deepCopy(retainUuid: Boolean): TemplateReference

Note that the context must be updated manually.

Link copied to clipboard
open override fun doValidate(): String?

Validates the state, and indicates whether and why it is invalid.