Пример #1
0
 private static Collection<DeclarationDescriptor> getAllVariables(LexicalScope scope) {
   Collection<DeclarationDescriptor> result = ContainerUtil.newArrayList();
   result.addAll(
       ScopeUtilsKt.collectDescriptorsFiltered(
           scope, DescriptorKindFilter.VARIABLES, MemberScope.Companion.getALL_NAME_FILTER()));
   for (ReceiverParameterDescriptor implicitReceiver :
       ScopeUtilsKt.getImplicitReceiversHierarchy(scope)) {
     result.addAll(DescriptorUtils.getAllDescriptors(implicitReceiver.getType().getMemberScope()));
   }
   return result;
 }
Пример #2
0
 @NotNull
 public static Collection<DeclarationDescriptor> getAllDescriptors(@NotNull MemberScope scope) {
   return scope.getContributedDescriptors(
       DescriptorKindFilter.ALL, MemberScope.Companion.getALL_NAME_FILTER());
 }