blob: 0fcb03922d3a41b9844d8829f02f948bc778520e [file] [log] [blame]
// GENERATED CODE. DO NOT EDIT.
//
// To change the contents of this library, make changes to the builder source
// files in the tool/mustachio/ directory.
// ignore_for_file: camel_case_types, deprecated_member_use_from_same_package
// ignore_for_file: non_constant_identifier_names, unnecessary_string_escapes
// ignore_for_file: unused_import
// ignore_for_file: use_super_parameters
import 'package:dartdoc/src/element_type.dart';
import 'package:dartdoc/src/generator/template_data.dart';
import 'package:dartdoc/src/model/annotation.dart';
import 'package:dartdoc/src/model/comment_referable.dart';
import 'package:dartdoc/src/model/extension_target.dart';
import 'package:dartdoc/src/model/feature.dart';
import 'package:dartdoc/src/model/feature_set.dart';
import 'package:dartdoc/src/model/language_feature.dart';
import 'package:dartdoc/src/model/model.dart';
import 'package:dartdoc/src/model/model_object_builder.dart';
import 'package:dartdoc/src/mustachio/parser.dart';
import 'package:dartdoc/src/mustachio/renderer_base.dart';
import 'package:dartdoc/src/warnings.dart';
import 'templates.dart';
void _render_Accessor(Accessor context, List<MustachioNode> ast,
Template template, StringSink sink,
{RendererBase<Object>? parent}) {
var renderer = _Renderer_Accessor(context, parent, template, sink);
renderer.renderBlock(ast);
}
class _Renderer_Accessor extends RendererBase<Accessor> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<CT_ extends Accessor>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
..._Renderer_ModelElement.propertyMap<CT_>(),
'aboveSidebarPath': Property(
getValue: (CT_ c) => c.aboveSidebarPath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.aboveSidebarPath, ast, r.template, sink,
parent: r);
},
),
'belowSidebarPath': Property(
getValue: (CT_ c) => c.belowSidebarPath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.belowSidebarPath == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.belowSidebarPath!, ast, r.template, sink,
parent: r);
},
),
'characterLocation': Property(
getValue: (CT_ c) => c.characterLocation,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'CharacterLocation'),
isNullValue: (CT_ c) => c.characterLocation == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.characterLocation, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['CharacterLocation']!);
},
),
'definingCombo': Property(
getValue: (CT_ c) => c.definingCombo,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty = _Renderer_GetterSetterCombo.propertyMap()
.getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as GetterSetterCombo,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.definingCombo, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['GetterSetterCombo']!);
},
),
'documentationComment': Property(
getValue: (CT_ c) => c.documentationComment,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(
c.documentationComment, ast, r.template, sink,
parent: r);
},
),
'element': Property(
getValue: (CT_ c) => c.element,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'PropertyAccessorElement'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.element, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['PropertyAccessorElement']!);
},
),
'enclosingCombo': Property(
getValue: (CT_ c) => c.enclosingCombo,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty = _Renderer_GetterSetterCombo.propertyMap()
.getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as GetterSetterCombo,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.enclosingCombo, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['GetterSetterCombo']!);
},
),
'enclosingElement': Property(
getValue: (CT_ c) => c.enclosingElement,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_ModelElement.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as ModelElement,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_ModelElement(
c.enclosingElement, ast, r.template, sink,
parent: r);
},
),
'filePath': Property(
getValue: (CT_ c) => c.filePath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.filePath, ast, r.template, sink,
parent: r);
},
),
'hasDocumentationComment': Property(
getValue: (CT_ c) => c.hasDocumentationComment,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.hasDocumentationComment == true,
),
'href': Property(
getValue: (CT_ c) => c.href,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.href == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.href!, ast, r.template, sink, parent: r);
},
),
'isCanonical': Property(
getValue: (CT_ c) => c.isCanonical,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isCanonical == true,
),
'isGetter': Property(
getValue: (CT_ c) => c.isGetter,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isGetter == true,
),
'isSetter': Property(
getValue: (CT_ c) => c.isSetter,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isSetter == true,
),
'isSynthetic': Property(
getValue: (CT_ c) => c.isSynthetic,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isSynthetic == true,
),
'kind': Property(
getValue: (CT_ c) => c.kind,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'Kind'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.kind, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Kind']!);
},
),
'modelType': Property(
getValue: (CT_ c) => c.modelType,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Callable.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Callable,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Callable(c.modelType, ast, r.template, sink,
parent: r);
},
),
'namePart': Property(
getValue: (CT_ c) => c.namePart,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.namePart, ast, r.template, sink,
parent: r);
},
),
'originalMember': Property(
getValue: (CT_ c) => c.originalMember,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'ExecutableMember'),
isNullValue: (CT_ c) => c.originalMember == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.originalMember, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['ExecutableMember']!);
},
),
'referenceChildren': Property(
getValue: (CT_ c) => c.referenceChildren,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Map<String, CommentReferable>'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.referenceChildren, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Map']!);
},
),
'referenceParents': Property(
getValue: (CT_ c) => c.referenceParents,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Iterable<CommentReferable>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.referenceParents.map((e) => renderSimple(
e, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['CommentReferable']!));
},
),
'sourceCode': Property(
getValue: (CT_ c) => c.sourceCode,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.sourceCode, ast, r.template, sink,
parent: r);
},
),
}) as Map<String, Property<CT_>>;
_Renderer_Accessor(Accessor context, RendererBase<Object>? parent,
Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<Accessor>? getProperty(String key) {
if (propertyMap<Accessor>().containsKey(key)) {
return propertyMap<Accessor>()[key];
} else {
return null;
}
}
}
void _render_Annotation(Annotation context, List<MustachioNode> ast,
Template template, StringSink sink,
{RendererBase<Object>? parent}) {
var renderer = _Renderer_Annotation(context, parent, template, sink);
renderer.renderBlock(ast);
}
class _Renderer_Annotation extends RendererBase<Annotation> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<CT_ extends Annotation>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
..._Renderer_Feature.propertyMap<CT_>(),
..._Renderer_ModelBuilder.propertyMap<CT_>(),
'annotation': Property(
getValue: (CT_ c) => c.annotation,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'ElementAnnotation'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.annotation, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['ElementAnnotation']!);
},
),
'cssClassName': Property(
getValue: (CT_ c) => c.cssClassName,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.cssClassName, ast, r.template, sink,
parent: r);
},
),
'hashCode': Property(
getValue: (CT_ c) => c.hashCode,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'int'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.hashCode, ast, r.template, sink,
parent: r, getters: _invisibleGetters['int']!);
},
),
'isPublic': Property(
getValue: (CT_ c) => c.isPublic,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isPublic == true,
),
'library': Property(
getValue: (CT_ c) => c.library,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Library.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Library,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Library(c.library, ast, r.template, sink,
parent: r);
},
),
'linkedName': Property(
getValue: (CT_ c) => c.linkedName,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.linkedName, ast, r.template, sink,
parent: r);
},
),
'linkedNameWithParameters': Property(
getValue: (CT_ c) => c.linkedNameWithParameters,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(
c.linkedNameWithParameters, ast, r.template, sink,
parent: r);
},
),
'modelType': Property(
getValue: (CT_ c) => c.modelType,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_ElementType.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as ElementType,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_ElementType(c.modelType, ast, r.template, sink,
parent: r);
},
),
'packageGraph': Property(
getValue: (CT_ c) => c.packageGraph,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'PackageGraph'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.packageGraph, ast, r.template, sink,
parent: r, getters: _invisibleGetters['PackageGraph']!);
},
),
'parameterText': Property(
getValue: (CT_ c) => c.parameterText,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.parameterText, ast, r.template, sink,
parent: r);
},
),
}) as Map<String, Property<CT_>>;
_Renderer_Annotation(Annotation context, RendererBase<Object>? parent,
Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<Annotation>? getProperty(String key) {
if (propertyMap<Annotation>().containsKey(key)) {
return propertyMap<Annotation>()[key];
} else {
return null;
}
}
}
void _render_Callable(Callable context, List<MustachioNode> ast,
Template template, StringSink sink,
{RendererBase<Object>? parent}) {
var renderer = _Renderer_Callable(context, parent, template, sink);
renderer.renderBlock(ast);
}
class _Renderer_Callable extends RendererBase<Callable> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<CT_ extends Callable>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
'linkedName': Property(
getValue: (CT_ c) => c.linkedName,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.linkedName, ast, r.template, sink,
parent: r);
},
),
'parameters': Property(
getValue: (CT_ c) => c.parameters,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<Parameter>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.parameters.map((e) =>
_render_Parameter(e, ast, r.template, sink, parent: r));
},
),
'returnType': Property(
getValue: (CT_ c) => c.returnType,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_ElementType.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as ElementType,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_ElementType(c.returnType, ast, r.template, sink,
parent: r);
},
),
'type': Property(
getValue: (CT_ c) => c.type,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'FunctionType'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.type, ast, r.template, sink,
parent: r, getters: _invisibleGetters['FunctionType']!);
},
),
}) as Map<String, Property<CT_>>;
_Renderer_Callable(Callable context, RendererBase<Object>? parent,
Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<Callable>? getProperty(String key) {
if (propertyMap<Callable>().containsKey(key)) {
return propertyMap<Callable>()[key];
} else {
return null;
}
}
}
class _Renderer_CanonicalFor extends RendererBase<CanonicalFor> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<CT_ extends CanonicalFor>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
'canonicalFor': Property(
getValue: (CT_ c) => c.canonicalFor,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Set<String>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.canonicalFor.map((e) =>
_render_String(e, ast, r.template, sink, parent: r));
},
),
}) as Map<String, Property<CT_>>;
_Renderer_CanonicalFor(CanonicalFor context, RendererBase<Object>? parent,
Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<CanonicalFor>? getProperty(String key) {
if (propertyMap<CanonicalFor>().containsKey(key)) {
return propertyMap<CanonicalFor>()[key];
} else {
return null;
}
}
}
class _Renderer_Canonicalization extends RendererBase<Canonicalization> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<
CT_ extends Canonicalization>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
..._Renderer_Object.propertyMap<CT_>(),
'canonicalLibrary': Property(
getValue: (CT_ c) => c.canonicalLibrary,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Library.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Library,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.canonicalLibrary == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Library(c.canonicalLibrary!, ast, r.template, sink,
parent: r);
},
),
'isCanonical': Property(
getValue: (CT_ c) => c.isCanonical,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isCanonical == true,
),
'locationPieces': Property(
getValue: (CT_ c) => c.locationPieces,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Set<String>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.locationPieces.map((e) =>
_render_String(e, ast, r.template, sink, parent: r));
},
),
}) as Map<String, Property<CT_>>;
_Renderer_Canonicalization(Canonicalization context,
RendererBase<Object>? parent, Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<Canonicalization>? getProperty(String key) {
if (propertyMap<Canonicalization>().containsKey(key)) {
return propertyMap<Canonicalization>()[key];
} else {
return null;
}
}
}
class _Renderer_Categorization extends RendererBase<Categorization> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<CT_ extends Categorization>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
'categories': Property(
getValue: (CT_ c) => c.categories,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Iterable<Category>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.categories.map((e) =>
_render_Category(e, ast, r.template, sink, parent: r));
},
),
'categoryNames': Property(
getValue: (CT_ c) => c.categoryNames,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<String>'),
isNullValue: (CT_ c) => c.categoryNames == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.categoryNames, ast, r.template, sink,
parent: r, getters: _invisibleGetters['List']!);
},
),
'displayedCategories': Property(
getValue: (CT_ c) => c.displayedCategories,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Iterable<Category>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.displayedCategories.map((e) =>
_render_Category(e, ast, r.template, sink, parent: r));
},
),
'hasCategorization': Property(
getValue: (CT_ c) => c.hasCategorization,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.hasCategorization == true,
),
'hasCategoryNames': Property(
getValue: (CT_ c) => c.hasCategoryNames,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.hasCategoryNames == true,
),
'hasImage': Property(
getValue: (CT_ c) => c.hasImage,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.hasImage == true,
),
'hasSamples': Property(
getValue: (CT_ c) => c.hasSamples,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.hasSamples == true,
),
'hasSubCategoryNames': Property(
getValue: (CT_ c) => c.hasSubCategoryNames,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.hasSubCategoryNames == true,
),
'image': Property(
getValue: (CT_ c) => c.image,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.image == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.image!, ast, r.template, sink, parent: r);
},
),
'samples': Property(
getValue: (CT_ c) => c.samples,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.samples == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.samples!, ast, r.template, sink,
parent: r);
},
),
'subCategoryNames': Property(
getValue: (CT_ c) => c.subCategoryNames,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<String>'),
isNullValue: (CT_ c) => c.subCategoryNames == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.subCategoryNames, ast, r.template, sink,
parent: r, getters: _invisibleGetters['List']!);
},
),
}) as Map<String, Property<CT_>>;
_Renderer_Categorization(Categorization context, RendererBase<Object>? parent,
Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<Categorization>? getProperty(String key) {
if (propertyMap<Categorization>().containsKey(key)) {
return propertyMap<Categorization>()[key];
} else {
return null;
}
}
}
void _render_Category(Category context, List<MustachioNode> ast,
Template template, StringSink sink,
{RendererBase<Object>? parent}) {
var renderer = _Renderer_Category(context, parent, template, sink);
renderer.renderBlock(ast);
}
class _Renderer_Category extends RendererBase<Category> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<CT_ extends Category>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
..._Renderer_Nameable.propertyMap<CT_>(),
..._Renderer_Warnable.propertyMap<CT_>(),
..._Renderer_CommentReferable.propertyMap<CT_>(),
..._Renderer_Locatable.propertyMap<CT_>(),
..._Renderer_Canonicalization.propertyMap<CT_>(),
..._Renderer_MarkdownFileDocumentation.propertyMap<CT_>(),
..._Renderer_LibraryContainer.propertyMap<CT_>(),
..._Renderer_TopLevelContainer.propertyMap<CT_>(),
..._Renderer_Indexable.propertyMap<CT_>(),
..._Renderer_ModelBuilder.propertyMap<CT_>(),
'canonicalLibrary': Property(
getValue: (CT_ c) => c.canonicalLibrary,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Library.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Library,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Library(c.canonicalLibrary, ast, r.template, sink,
parent: r);
},
),
'categoryDefinition': Property(
getValue: (CT_ c) => c.categoryDefinition,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'CategoryDefinition'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.categoryDefinition, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['CategoryDefinition']!);
},
),
'categoryIndex': Property(
getValue: (CT_ c) => c.categoryIndex,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'int'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.categoryIndex, ast, r.template, sink,
parent: r, getters: _invisibleGetters['int']!);
},
),
'categoryLabel': Property(
getValue: (CT_ c) => c.categoryLabel,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.categoryLabel, ast, r.template, sink,
parent: r);
},
),
'classes': Property(
getValue: (CT_ c) => c.classes,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Iterable<Class>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.classes.map((e) =>
_render_Class(e, ast, r.template, sink, parent: r));
},
),
'config': Property(
getValue: (CT_ c) => c.config,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'DartdocOptionContext'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.config, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['DartdocOptionContext']!);
},
),
'constants': Property(
getValue: (CT_ c) => c.constants,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<TopLevelVariable>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.constants.map((e) => _render_TopLevelVariable(
e, ast, r.template, sink,
parent: r));
},
),
'containerOrder': Property(
getValue: (CT_ c) => c.containerOrder,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<String>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.containerOrder.map((e) =>
_render_String(e, ast, r.template, sink, parent: r));
},
),
'documentationFile': Property(
getValue: (CT_ c) => c.documentationFile,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'File'),
isNullValue: (CT_ c) => c.documentationFile == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.documentationFile, ast, r.template, sink,
parent: r, getters: _invisibleGetters['File']!);
},
),
'documentationFrom': Property(
getValue: (CT_ c) => c.documentationFrom,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<Locatable>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.documentationFrom.map((e) => renderSimple(
e, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Locatable']!));
},
),
'documentedWhere': Property(
getValue: (CT_ c) => c.documentedWhere,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'DocumentLocation'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.documentedWhere, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['DocumentLocation']!);
},
),
'element': Property(
getValue: (CT_ c) => c.element,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'Element'),
isNullValue: (CT_ c) => c.element == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.element, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Element']!);
},
),
'enclosingName': Property(
getValue: (CT_ c) => c.enclosingName,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.enclosingName, ast, r.template, sink,
parent: r);
},
),
'enums': Property(
getValue: (CT_ c) => c.enums,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<Enum>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.enums.map((e) =>
_render_Enum(e, ast, r.template, sink, parent: r));
},
),
'exceptions': Property(
getValue: (CT_ c) => c.exceptions,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Iterable<Class>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.exceptions.map((e) =>
_render_Class(e, ast, r.template, sink, parent: r));
},
),
'extensions': Property(
getValue: (CT_ c) => c.extensions,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<Extension>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.extensions.map((e) =>
_render_Extension(e, ast, r.template, sink, parent: r));
},
),
'filePath': Property(
getValue: (CT_ c) => c.filePath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.filePath, ast, r.template, sink,
parent: r);
},
),
'fullyQualifiedName': Property(
getValue: (CT_ c) => c.fullyQualifiedName,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.fullyQualifiedName, ast, r.template, sink,
parent: r);
},
),
'functions': Property(
getValue: (CT_ c) => c.functions,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<ModelFunction>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.functions.map((e) => _render_ModelFunction(
e, ast, r.template, sink,
parent: r));
},
),
'href': Property(
getValue: (CT_ c) => c.href,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.href == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.href!, ast, r.template, sink, parent: r);
},
),
'isCanonical': Property(
getValue: (CT_ c) => c.isCanonical,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isCanonical == true,
),
'isDocumented': Property(
getValue: (CT_ c) => c.isDocumented,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isDocumented == true,
),
'kind': Property(
getValue: (CT_ c) => c.kind,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'Kind'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.kind, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Kind']!);
},
),
'linkedName': Property(
getValue: (CT_ c) => c.linkedName,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.linkedName, ast, r.template, sink,
parent: r);
},
),
'mixins': Property(
getValue: (CT_ c) => c.mixins,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<Mixin>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.mixins.map((e) =>
_render_Mixin(e, ast, r.template, sink, parent: r));
},
),
'name': Property(
getValue: (CT_ c) => c.name,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.name, ast, r.template, sink, parent: r);
},
),
'package': Property(
getValue: (CT_ c) => c.package,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Package.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Package,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Package(c.package, ast, r.template, sink,
parent: r);
},
),
'packageGraph': Property(
getValue: (CT_ c) => c.packageGraph,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'PackageGraph'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.packageGraph, ast, r.template, sink,
parent: r, getters: _invisibleGetters['PackageGraph']!);
},
),
'properties': Property(
getValue: (CT_ c) => c.properties,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<TopLevelVariable>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.properties.map((e) => _render_TopLevelVariable(
e, ast, r.template, sink,
parent: r));
},
),
'referenceChildren': Property(
getValue: (CT_ c) => c.referenceChildren,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Map<String, CommentReferable>'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.referenceChildren, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Map']!);
},
),
'referenceParents': Property(
getValue: (CT_ c) => c.referenceParents,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Iterable<CommentReferable>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.referenceParents.map((e) => renderSimple(
e, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['CommentReferable']!));
},
),
'sortKey': Property(
getValue: (CT_ c) => c.sortKey,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.sortKey, ast, r.template, sink, parent: r);
},
),
'typedefs': Property(
getValue: (CT_ c) => c.typedefs,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<Typedef>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.typedefs.map((e) =>
_render_Typedef(e, ast, r.template, sink, parent: r));
},
),
}) as Map<String, Property<CT_>>;
_Renderer_Category(Category context, RendererBase<Object>? parent,
Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<Category>? getProperty(String key) {
if (propertyMap<Category>().containsKey(key)) {
return propertyMap<Category>()[key];
} else {
return null;
}
}
}
String renderCategory(CategoryTemplateData context, Template template) {
var buffer = StringBuffer();
_render_CategoryTemplateData(context, template.ast, template, buffer);
return buffer.toString();
}
void _render_CategoryTemplateData(CategoryTemplateData context,
List<MustachioNode> ast, Template template, StringSink sink,
{RendererBase<Object>? parent}) {
var renderer =
_Renderer_CategoryTemplateData(context, parent, template, sink);
renderer.renderBlock(ast);
}
class _Renderer_CategoryTemplateData
extends RendererBase<CategoryTemplateData> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<
CT_ extends CategoryTemplateData>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
..._Renderer_TemplateData.propertyMap<Category, CT_>(),
..._Renderer_OneDirectoryDown.propertyMap<Category, CT_>(),
'aboveSidebarPath': Property(
getValue: (CT_ c) => c.aboveSidebarPath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.aboveSidebarPath == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.aboveSidebarPath!, ast, r.template, sink,
parent: r);
},
),
'belowSidebarPath': Property(
getValue: (CT_ c) => c.belowSidebarPath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.belowSidebarPath == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.belowSidebarPath!, ast, r.template, sink,
parent: r);
},
),
'category': Property(
getValue: (CT_ c) => c.category,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Category.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Category,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Category(c.category, ast, r.template, sink,
parent: r);
},
),
'layoutTitle': Property(
getValue: (CT_ c) => c.layoutTitle,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.layoutTitle, ast, r.template, sink,
parent: r);
},
),
'metaDescription': Property(
getValue: (CT_ c) => c.metaDescription,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.metaDescription, ast, r.template, sink,
parent: r);
},
),
'navLinks': Property(
getValue: (CT_ c) => c.navLinks,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<Documentable>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.navLinks.map((e) => _render_Documentable(
e, ast, r.template, sink,
parent: r));
},
),
'self': Property(
getValue: (CT_ c) => c.self,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Category.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Category,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Category(c.self, ast, r.template, sink, parent: r);
},
),
'title': Property(
getValue: (CT_ c) => c.title,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.title, ast, r.template, sink, parent: r);
},
),
}) as Map<String, Property<CT_>>;
_Renderer_CategoryTemplateData(CategoryTemplateData context,
RendererBase<Object>? parent, Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<CategoryTemplateData>? getProperty(String key) {
if (propertyMap<CategoryTemplateData>().containsKey(key)) {
return propertyMap<CategoryTemplateData>()[key];
} else {
return null;
}
}
}
void _render_Class(
Class context, List<MustachioNode> ast, Template template, StringSink sink,
{RendererBase<Object>? parent}) {
var renderer = _Renderer_Class(context, parent, template, sink);
renderer.renderBlock(ast);
}
class _Renderer_Class extends RendererBase<Class> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<CT_ extends Class>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
..._Renderer_InheritingContainer.propertyMap<CT_>(),
..._Renderer_Constructable.propertyMap<CT_>(),
..._Renderer_TypeImplementing.propertyMap<CT_>(),
..._Renderer_MixedInTypes.propertyMap<CT_>(),
'allModelElements': Property(
getValue: (CT_ c) => c.allModelElements,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<ModelElement>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.allModelElements.map((e) => _render_ModelElement(
e, ast, r.template, sink,
parent: r));
},
),
'element': Property(
getValue: (CT_ c) => c.element,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'ClassElement'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.element, ast, r.template, sink,
parent: r, getters: _invisibleGetters['ClassElement']!);
},
),
'inheritanceChain': Property(
getValue: (CT_ c) => c.inheritanceChain,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<InheritingContainer>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.inheritanceChain.map((e) =>
_render_InheritingContainer(e, ast, r.template, sink,
parent: r));
},
),
'isAbstract': Property(
getValue: (CT_ c) => c.isAbstract,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isAbstract == true,
),
'isBase': Property(
getValue: (CT_ c) => c.isBase,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isBase == true,
),
'isErrorOrException': Property(
getValue: (CT_ c) => c.isErrorOrException,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isErrorOrException == true,
),
'isFinal': Property(
getValue: (CT_ c) => c.isFinal,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isFinal == true,
),
'isInterface': Property(
getValue: (CT_ c) => c.isInterface,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isInterface == true,
),
'isMixinClass': Property(
getValue: (CT_ c) => c.isMixinClass,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isMixinClass == true,
),
'isSealed': Property(
getValue: (CT_ c) => c.isSealed,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isSealed == true,
),
'kind': Property(
getValue: (CT_ c) => c.kind,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'Kind'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.kind, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Kind']!);
},
),
'relationshipsClass': Property(
getValue: (CT_ c) => c.relationshipsClass,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.relationshipsClass, ast, r.template, sink,
parent: r);
},
),
'sidebarPath': Property(
getValue: (CT_ c) => c.sidebarPath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.sidebarPath, ast, r.template, sink,
parent: r);
},
),
}) as Map<String, Property<CT_>>;
_Renderer_Class(Class context, RendererBase<Object>? parent,
Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<Class>? getProperty(String key) {
if (propertyMap<Class>().containsKey(key)) {
return propertyMap<Class>()[key];
} else {
return null;
}
}
}
String renderClass(ClassTemplateData context, Template template) {
var buffer = StringBuffer();
_render_ClassTemplateData(context, template.ast, template, buffer);
return buffer.toString();
}
void _render_ClassTemplateData(ClassTemplateData context,
List<MustachioNode> ast, Template template, StringSink sink,
{RendererBase<Object>? parent}) {
var renderer = _Renderer_ClassTemplateData(context, parent, template, sink);
renderer.renderBlock(ast);
}
class _Renderer_ClassTemplateData extends RendererBase<ClassTemplateData> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<
CT_ extends ClassTemplateData>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
..._Renderer_InheritingContainerTemplateData.propertyMap<Class,
CT_>(),
'clazz': Property(
getValue: (CT_ c) => c.clazz,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Class.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Class,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Class(c.clazz, ast, r.template, sink, parent: r);
},
),
}) as Map<String, Property<CT_>>;
_Renderer_ClassTemplateData(ClassTemplateData context,
RendererBase<Object>? parent, Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<ClassTemplateData>? getProperty(String key) {
if (propertyMap<ClassTemplateData>().containsKey(key)) {
return propertyMap<ClassTemplateData>()[key];
} else {
return null;
}
}
}
class _Renderer_CommentReferable extends RendererBase<CommentReferable> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<
CT_ extends CommentReferable>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
'href': Property(
getValue: (CT_ c) => c.href,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.href == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.href!, ast, r.template, sink, parent: r);
},
),
'library': Property(
getValue: (CT_ c) => c.library,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Library.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Library,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.library == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Library(c.library!, ast, r.template, sink,
parent: r);
},
),
'referenceChildren': Property(
getValue: (CT_ c) => c.referenceChildren,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Map<String, CommentReferable>'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.referenceChildren, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Map']!);
},
),
'referenceGrandparentOverrides': Property(
getValue: (CT_ c) => c.referenceGrandparentOverrides,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Iterable<CommentReferable>'),
isNullValue: (CT_ c) =>
c.referenceGrandparentOverrides == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(
c.referenceGrandparentOverrides, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Iterable']!);
},
),
'referenceName': Property(
getValue: (CT_ c) => c.referenceName,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.referenceName, ast, r.template, sink,
parent: r);
},
),
'referenceParents': Property(
getValue: (CT_ c) => c.referenceParents,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Iterable<CommentReferable>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.referenceParents.map((e) => renderSimple(
e, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['CommentReferable']!));
},
),
'scope': Property(
getValue: (CT_ c) => c.scope,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'Scope'),
isNullValue: (CT_ c) => c.scope == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.scope, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Scope']!);
},
),
}) as Map<String, Property<CT_>>;
_Renderer_CommentReferable(CommentReferable context,
RendererBase<Object>? parent, Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<CommentReferable>? getProperty(String key) {
if (propertyMap<CommentReferable>().containsKey(key)) {
return propertyMap<CommentReferable>()[key];
} else {
return null;
}
}
}
class _Renderer_Constructable extends RendererBase<Constructable> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<CT_ extends Constructable>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
'constructors': Property(
getValue: (CT_ c) => c.constructors,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Iterable<Constructor>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.constructors.map((e) => _render_Constructor(
e, ast, r.template, sink,
parent: r));
},
),
'hasPublicConstructors': Property(
getValue: (CT_ c) => c.hasPublicConstructors,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.hasPublicConstructors == true,
),
'publicConstructorsSorted': Property(
getValue: (CT_ c) => c.publicConstructorsSorted,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'List<Constructor>'),
renderIterable: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
return c.publicConstructorsSorted.map((e) =>
_render_Constructor(e, ast, r.template, sink,
parent: r));
},
),
}) as Map<String, Property<CT_>>;
_Renderer_Constructable(Constructable context, RendererBase<Object>? parent,
Template template, StringSink sink)
: super(context, parent, template, sink);
@override
Property<Constructable>? getProperty(String key) {
if (propertyMap<Constructable>().containsKey(key)) {
return propertyMap<Constructable>()[key];
} else {
return null;
}
}
}
void _render_Constructor(Constructor context, List<MustachioNode> ast,
Template template, StringSink sink,
{RendererBase<Object>? parent}) {
var renderer = _Renderer_Constructor(context, parent, template, sink);
renderer.renderBlock(ast);
}
class _Renderer_Constructor extends RendererBase<Constructor> {
static final Map<Type, Object> _propertyMapCache = {};
static Map<String, Property<CT_>> propertyMap<CT_ extends Constructor>() =>
_propertyMapCache.putIfAbsent(
CT_,
() => {
..._Renderer_ModelElement.propertyMap<CT_>(),
..._Renderer_TypeParameters.propertyMap<CT_>(),
..._Renderer_ContainerMember.propertyMap<CT_>(),
'aboveSidebarPath': Property(
getValue: (CT_ c) => c.aboveSidebarPath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.aboveSidebarPath, ast, r.template, sink,
parent: r);
},
),
'belowSidebarPath': Property(
getValue: (CT_ c) => c.belowSidebarPath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => c.belowSidebarPath == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.belowSidebarPath!, ast, r.template, sink,
parent: r);
},
),
'characterLocation': Property(
getValue: (CT_ c) => c.characterLocation,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'CharacterLocation'),
isNullValue: (CT_ c) => c.characterLocation == null,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.characterLocation, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['CharacterLocation']!);
},
),
'element': Property(
getValue: (CT_ c) => c.element,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'ConstructorElement'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.element, ast, r.template, sink,
parent: r,
getters: _invisibleGetters['ConstructorElement']!);
},
),
'enclosingElement': Property(
getValue: (CT_ c) => c.enclosingElement,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Container.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Container,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Container(c.enclosingElement, ast, r.template, sink,
parent: r);
},
),
'filePath': Property(
getValue: (CT_ c) => c.filePath,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.filePath, ast, r.template, sink,
parent: r);
},
),
'fullKind': Property(
getValue: (CT_ c) => c.fullKind,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.fullKind, ast, r.template, sink,
parent: r);
},
),
'fullyQualifiedName': Property(
getValue: (CT_ c) => c.fullyQualifiedName,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.fullyQualifiedName, ast, r.template, sink,
parent: r);
},
),
'isConst': Property(
getValue: (CT_ c) => c.isConst,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isConst == true,
),
'isDefaultConstructor': Property(
getValue: (CT_ c) => c.isDefaultConstructor,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isDefaultConstructor == true,
),
'isFactory': Property(
getValue: (CT_ c) => c.isFactory,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isFactory == true,
),
'isUnnamedConstructor': Property(
getValue: (CT_ c) => c.isUnnamedConstructor,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'bool'),
getBool: (CT_ c) => c.isUnnamedConstructor == true,
),
'kind': Property(
getValue: (CT_ c) => c.kind,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(c, remainingNames, 'Kind'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.kind, ast, r.template, sink,
parent: r, getters: _invisibleGetters['Kind']!);
},
),
'modelType': Property(
getValue: (CT_ c) => c.modelType,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_Callable.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as Callable,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_Callable(c.modelType, ast, r.template, sink,
parent: r);
},
),
'name': Property(
getValue: (CT_ c) => c.name,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.name, ast, r.template, sink, parent: r);
},
),
'nameWithGenerics': Property(
getValue: (CT_ c) => c.nameWithGenerics,
renderVariable:
(CT_ c, Property<CT_> self, List<String> remainingNames) {
if (remainingNames.isEmpty) {
return self.getValue(c).toString();
}
var name = remainingNames.first;
var nextProperty =
_Renderer_String.propertyMap().getValue(name);
return nextProperty.renderVariable(
self.getValue(c) as String,
nextProperty,
[...remainingNames.skip(1)]);
},
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
_render_String(c.nameWithGenerics, ast, r.template, sink,
parent: r);
},
),
'referenceChildren': Property(
getValue: (CT_ c) => c.referenceChildren,
renderVariable: (CT_ c, Property<CT_> self,
List<String> remainingNames) =>
self.renderSimpleVariable(
c, remainingNames, 'Map<String, CommentReferable>'),
isNullValue: (CT_ c) => false,
renderValue: (CT_ c, RendererBase<CT_> r,
List<MustachioNode> ast, StringSink sink) {
renderSimple(c.referenceChildren, ast, r.<