const classafEfan::EfanMeta

sys::Obj
  afEfan::EfanMeta

Meta data about an efan template.

Generated by the EfanCompiler.

ctxName

Source

const Str? ctxName

The name of the ctx variable (if any) the template was compiled with.

ctxType

Source

const Type? ctxType

The ctx parameter type (if any) the template was compiled against.

instance

Source

Obj instance(Obj[]? ctorParams := null)

Returns an instance of type via type.make().

If type is const and no ctorParams are specified then the instance is cached and returned in later invocations.

render

Source

Str render(Obj? ctx)

Renders the efan template.

More specifically, this creates an instance of type (via Type.make) and calls the efan render method with the given ctx argument.

Convenience for:

renderFrom(instance, ctx)
renderFrom

Source

Str renderFrom(Obj instance, Obj? ctx)

Calls the render method on the given template. Any errs thrown are wrapped in an EfanErr that shows where in the efan template the error occurred.

renderMethod

Source

const Method renderMethod

The rendering method on type.

templateLoc

Source

const Uri templateLoc

Where the template originated from. Example, file://layout.efan.

templateSrc

Source

const Str templateSrc

The original efan template source string.

type

Source

const Type type

The Type of the compiled efan template.

typeSrc

Source

const Str typeSrc

The generated fantom code of the efan template (for the inquisitive).