SubtypeRendererTypeHandler

Renders any object of superType (including subtypes). If execution is ResultHandlerCodeExecution, this renderer may be optimized by pre-compilation (unlike ExactRendererTypeHandler).

Constructors

Link copied to clipboard
constructor(superType: KClass<*>, execution: ResultHandlerExecution)

Properties

Link copied to clipboard

Execution to handle result. Should not throw if acceptsField returns true

Link copied to clipboard
open override val mayBePrecompiled: Boolean

true if this type handler may be precompiled

Functions

Link copied to clipboard
open override fun accepts(value: Any?): Boolean

Returns true if this renderer accepts value, false otherwise

Link copied to clipboard
open override fun acceptsField(result: FieldValue): Boolean

Returns true if this renderer accepts result, false otherwise

Link copied to clipboard
open override fun acceptsType(type: KClass<*>): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun precompile(methodName: String, paramName: String): Code?

Returns method code for rendering

Link copied to clipboard

Replace variables and return the result.

Link copied to clipboard
open override fun toString(): String