private void processModifiersOnInitializer( @NotNull JetModifierListOwner owner, @NotNull LexicalScope scope) { annotationChecker.check(owner, trace, null); ModifierCheckerCore.INSTANCE$.check(owner, trace, null); JetModifierList modifierList = owner.getModifierList(); if (modifierList == null) return; annotationResolver.resolveAnnotationsWithArguments(scope, modifierList, trace); }
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)); } } }
private void reportErrorIfHasIllegalModifier(JetModifierListOwner declaration) { if (declaration.hasModifier(JetTokens.ENUM_KEYWORD)) { trace.report(ILLEGAL_ENUM_ANNOTATION.on(declaration)); } }
@NotNull public static Visibility resolveVisibilityFromModifiers( @NotNull JetModifierListOwner modifierListOwner, @NotNull Visibility defaultVisibility) { return resolveVisibilityFromModifiers(modifierListOwner.getModifierList(), defaultVisibility); }
@NotNull public static Modality resolveModalityFromModifiers( @NotNull JetModifierListOwner modifierListOwner, @NotNull Modality defaultModality) { return resolveModalityFromModifiers(modifierListOwner.getModifierList(), defaultModality); }