List<AnnotatedScannerMethod> list =
new ArrayList<AnnotatedScannerMethod>(20);
for (Method method : getMethods(c, Scanner.class)) {
Scanner a = method.getAnnotation(Scanner.class);
if (a.value() == JHeader.class) {
throw new HeaderDefinitionError(c, "non JHeader based classes, "
+ "must declare protocol class in @Scanner annotation");
}
list.add(new AnnotatedScannerMethod(method, a.value(), container));
}
AnnotatedScannerMethod[] m =
list.toArray(new AnnotatedScannerMethod[list.size()]);
cache.put(c, m);