private static void checkFieldModifiers(AnnotationHolder holder, GrVariableDeclaration fieldDeclaration) {
    GrVariable[] variables = fieldDeclaration.getVariables();
    if (variables.length == 0) return;

    GrVariable variable = variables[0];
    final GrField member = variable instanceof GrField ? (GrField)variable : findScriptField(variable);
    if (member == null) return;

    final GrModifierList modifierList = fieldDeclaration.getModifierList();

    checkAccessModifiers(holder, modifierList, member);
    checkDuplicateModifiers(holder, modifierList, member);

    if (modifierList.hasExplicitModifier(PsiModifier.VOLATILE) && modifierList.hasExplicitModifier(PsiModifier.FINAL)) {

      String message = GroovyBundle.message("illegal.combination.of.modifiers.volatile.and.final");
      AnnotationBuilder builder =
        holder.newAnnotation(HighlightSeverity.ERROR, message)
          .range(modifierList);
      builder = registerLocalFix(builder, new GrModifierFix(member, PsiModifier.VOLATILE, true, false, GrModifierFix.MODIFIER_LIST), modifierList,
                       message, ProblemHighlightType.ERROR, modifierList.getTextRange());
      builder = registerLocalFix(builder, new GrModifierFix(member, PsiModifier.FINAL, true, false, GrModifierFix.MODIFIER_LIST), modifierList,
                       message, ProblemHighlightType.ERROR, modifierList.getTextRange());
      builder.create();
    }

    if (member.getContainingClass() instanceof GrInterfaceDefinition) {
      checkModifierIsNotAllowed(modifierList,
                                PsiModifier.PRIVATE, GroovyBundle.message("interface.members.are.not.allowed.to.be", PsiModifier.PRIVATE), holder);
      checkModifierIsNotAllowed(modifierList, PsiModifier.PROTECTED, GroovyBundle.message("interface.members.are.not.allowed.to.be",
                                                                                          PsiModifier.PROTECTED),
                                holder);
    }
  }
private static void checkFieldModifiers(AnnotationHolder holder, GrVariableDeclaration fieldDeclaration)