} else if (Style.Language == FormatStyle::LK_Java) {
if (Left.is(Keywords.kw_synchronized) && Right.is(tok::l_paren))
return Style.SpaceBeforeParens != FormatStyle::SBPO_Never;
- if (Left.isOneOf(tok::kw_static, tok::kw_public) &&
+ if (Left.isOneOf(tok::kw_static, tok::kw_public, tok::kw_private,
+ tok::kw_protected) &&
Right.Type == TT_TemplateOpener)
return true;
}
"public Map<String, ?> getAll() {\n}");
verifyFormat("public <R> ArrayList<R> get() {\n}");
+ verifyFormat("protected <R> ArrayList<R> get() {\n}");
+ verifyFormat("private <R> ArrayList<R> get() {\n}");
verifyFormat("public static <R> ArrayList<R> get() {\n}");
verifyFormat("<T extends B> T getInstance(Class<T> type);");
verifyFormat("Function<F, ? extends T> function;");