Beispiel #1
0
 /*
    Use this method to get visibility flag for class to define it in byte code (v.defineClass method).
    For other cases use getVisibilityAccessFlag(MemberDescriptor descriptor)
    Classes in byte code should be public or package private
 */
 public static int getVisibilityAccessFlagForClass(ClassDescriptor descriptor) {
   if (DescriptorUtils.isTopLevelDeclaration(descriptor)
       || descriptor.getVisibility() == Visibilities.PUBLIC
       || descriptor.getVisibility() == Visibilities.INTERNAL) {
     return ACC_PUBLIC;
   }
   return NO_FLAG_PACKAGE_PRIVATE;
 }
 private void renderModalityForCallable(
     @NotNull CallableMemberDescriptor callable, @NotNull StringBuilder builder) {
   if (!DescriptorUtils.isTopLevelDeclaration(callable)
       || callable.getModality() != Modality.FINAL) {
     if (overridesSomething(callable)
         && overrideRenderingPolicy == OverrideRenderingPolicy.RENDER_OVERRIDE
         && callable.getModality() == Modality.OPEN) {
       return;
     }
     renderModality(callable.getModality(), builder);
   }
 }