Source
List<ModelFunction> get functions {
if (_functions != null) return _functions;
Set<FunctionElement> elements = new Set();
elements.addAll(_libraryElement.definingCompilationUnit.functions);
for (CompilationUnitElement cu in _libraryElement.parts) {
elements.addAll(cu.functions);
}
elements.addAll(_exportedNamespace.definedNames.values
.where((element) => element is FunctionElement));
_functions = elements.where(isPublic).map((e) {
return new ModelElement.from(e, this);
}).toList(growable: false)
..sort(byName);
return _functions;
}