예제 #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;
        }
예제 #2
0
 @Override
 protected boolean isVisible(
     @NotNull DeclarationDescriptorWithVisibility what,
     @NotNull DeclarationDescriptor from) {
   return PROTECTED.isVisible(what, from) && INTERNAL.isVisible(what, from);
 }