this.arguments = arguments;
}
boolean matches(Diagnostic diagnostic) {
I18NMessage message = diagnostic.getMessage();
int argumentCount = message.getArgumentCount();
boolean matched;
if (diagnostic.getPath().getAsString().equals(path)
&& diagnostic.getLevel() == level
&& message.getKey().equals(key)
&& (arguments == null ?
argumentCount == 0 :
argumentCount == arguments.length)) {
matched = true;
for (int a = 0; matched && a < argumentCount; a += 1) {
Object expected = arguments[a];
Object actual = message.getArgument(a);
if (expected == null ?
actual != null : !expected.equals(actual)) {
matched = false;
}
}