Esempio n. 1
0
 private void checkNestedClassAllowed(
     @NotNull JetModifierListOwner modifierListOwner,
     @NotNull DeclarationDescriptor descriptor) {
   if (modifierListOwner.hasModifier(INNER_KEYWORD)) return;
   if (modifierListOwner instanceof JetClass && !(modifierListOwner instanceof JetEnumEntry)) {
     JetClass aClass = (JetClass) modifierListOwner;
     boolean localEnumError = aClass.isLocal() && aClass.isEnum();
     if (!localEnumError && isIllegalNestedClass(descriptor)) {
       trace.report(NESTED_CLASS_NOT_ALLOWED.on(aClass));
     }
   }
 }
Esempio n. 2
0
 @NotNull
 public static Visibility resolveVisibilityFromModifiers(
     @NotNull JetModifierListOwner modifierListOwner, @NotNull Visibility defaultVisibility) {
   return resolveVisibilityFromModifiers(modifierListOwner.getModifierList(), defaultVisibility);
 }
Esempio n. 3
0
 @NotNull
 public static Modality resolveModalityFromModifiers(
     @NotNull JetModifierListOwner modifierListOwner, @NotNull Modality defaultModality) {
   return resolveModalityFromModifiers(modifierListOwner.getModifierList(), defaultModality);
 }