ModelElement enclosingElement

Source

@override
ModelElement get enclosingElement {
  if (_accessor.enclosingElement is CompilationUnitElement) {
    return package
        .findOrCreateLibraryFor(_accessor.enclosingElement.enclosingElement);
  }

  return new ModelElement.from(_accessor.enclosingElement, library);
}