boolean (PsiBuilder builder, boolean wildcard, boolean diamonds) { PsiBuilder.Marker list = builder.mark(); if (!expect(builder, JavaTokenType.LT)) { list.done(myJavaElementTypeContainer.REFERENCE_PARAMETER_LIST); return false; } int flags = set(set(EAT_LAST_DOT, WILDCARD, wildcard), DIAMONDS, diamonds); boolean isOk = true; while (true) { if (parseTypeInfo(builder, flags, true) == null) { error(builder, JavaPsiBundle.message("expected.identifier")); } else { IElementType tokenType = builder.getTokenType(); if (WILDCARD_KEYWORD_SET.contains(tokenType)) { parseReferenceList(builder, tokenType, null, JavaTokenType.AND); } } if (expect(builder, JavaTokenType.GT)) { break; } else if (!expectOrError(builder, JavaTokenType.COMMA, "expected.gt.or.comma")) { isOk = false; break; } flags = set(flags, DIAMONDS, false); } list.done(myJavaElementTypeContainer.REFERENCE_PARAMETER_LIST); return isOk; }