LazyOutputArtifact

data class LazyOutputArtifact(val name: String, val content: () -> List<Byte>, val type: ArtifactType) : OutputArtifact<() -> List<Byte>>

Represents a BinaryOutputArtifact whose content is lazily loaded on demand (via accept).

Parameters

name

name of the resource (without file extensions)

content

supplier of the content of the resource, retrieved upon visit

type

type of content the resource contains

Constructors

Link copied to clipboard
constructor(name: String, content: () -> List<Byte>, type: ArtifactType)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val content: () -> List<Byte>
Link copied to clipboard

File extension relative to the ArtifactType of this resource.

Link copied to clipboard

Name of the corresponding file of this resource, without the extension, with symbols removed and spaces replaced with dashes.

Link copied to clipboard

Full name of the file, including the extension relative to the ArtifactType of this resource.

Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val type: ArtifactType

Functions

Link copied to clipboard
open override fun <T> accept(visitor: OutputResourceVisitor<T>): T

Accepts a visitor to perform operations on the resource.

Link copied to clipboard
fun OutputResource.saveTo(directory: File): File

Saves this resource to file in a directory.