/** * Checks order of methods. * * @param methods Iterable<DetailAST> methods */ private void checkOrder(final Iterable<DetailAST> methods) { MethodsOrderCheck.Modifiers prev = MethodsOrderCheck.Modifiers.PUB; for (final DetailAST method : methods) { final MethodsOrderCheck.Modifiers mtype = MethodsOrderCheck.getModifierType(method); if (mtype.getOrder() < prev.getOrder()) { this.log(method.getLineNo(), "Wrong method declaration order"); } else { prev = mtype; } } }