Cache parameter annotations in MethodParameter

SE
2d ago
+156-7

Constructor binding creates a MethodParameter per constructor parameter, and each instance calls Executable.getParameterAnnotations(), which parses the annotations of all parameters again. A record with N @BindParam components therefore costs N² parses per bind: at N=100, 17 ms on main and 0.96 ms with this change. On 7.x, Nullness.forMethodParameter repeated the same parse.