const classafEfan::EfanMeta
sys::Obj afEfan::EfanMeta
Meta data about an efan template.
Generated by the EfanCompiler
.
- ctxName
const Str? ctxName
The name of the
ctx
variable (if any) the template was compiled with.- ctxType
const Type? ctxType
The
ctx
parameter type (if any) the template was compiled against.- instance
Obj instance(Obj[]? ctorParams := null)
Returns an instance of
type
viatype.make()
.If
type
is const and noctorParams
are specified then the instance is cached and returned in later invocations.- render
Renders the efan template.
More specifically, this creates an instance of
type
(viaType.make
) and calls the efan render method with the givenctx
argument.Convenience for:
renderFrom(instance, ctx)
- renderFrom
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
const Method renderMethod
The rendering method on
type
.- templateLoc
const Uri templateLoc
Where the template originated from. Example,
file://layout.efan
.- templateSrc
const Str templateSrc
The original efan template source string.
- type
const Type type
The
Type
of the compiled efan template.- typeSrc
const Str typeSrc
The generated fantom code of the efan template (for the inquisitive).