referenceChildren property

Map<String, CommentReferable> referenceChildren

Map of referenceName to the elements that are a member of this, but not this model element itself. Can be cached.

There is no need to duplicate references here that can be found via scope.

Implementation

@override
Map<String, CommentReferable> get referenceChildren {
  if (_referenceChildren == null) {
    _referenceChildren = {};
    var _modelType = modelType;
    if (_modelType is Callable) {
      _referenceChildren.addEntriesIfAbsent(
          _modelType.parameters.explicitOnCollisionWith(this));
    }
    _referenceChildren.addEntriesIfAbsent(
        modelType.typeArguments.explicitOnCollisionWith(this));
    if (_modelType is Callable) {
      _referenceChildren.addEntriesIfAbsent(
          _modelType.returnType.typeArguments.explicitOnCollisionWith(this));
    }
  }
  return _referenceChildren;
}