Esempio n. 1
0
        @Override
        public boolean isVisible(
            @NotNull ReceiverValue thisObject,
            @NotNull DeclarationDescriptorWithVisibility what,
            @NotNull DeclarationDescriptor from) {
          if (PRIVATE.isVisible(thisObject, what, from)) {
            DeclarationDescriptor classDescriptor =
                DescriptorUtils.getParentOfType(what, ClassDescriptor.class);

            if (classDescriptor != null && thisObject instanceof ClassReceiver) {
              return ((ClassReceiver) thisObject).getDeclarationDescriptor().getOriginal()
                  == classDescriptor.getOriginal();
            }
          }
          return false;
        }
Esempio n. 2
0
 @Override
 protected boolean isVisible(
     @NotNull DeclarationDescriptorWithVisibility what,
     @NotNull DeclarationDescriptor from) {
   return PROTECTED.isVisible(what, from) && INTERNAL.isVisible(what, from);
 }