()
| 373 | } |
| 374 | |
| 375 | private static void buildMap() |
| 376 | { |
| 377 | map = new CaseInsensitiveMap<>(); |
| 378 | Field[] fields = ObjectKey.class.getDeclaredFields(); |
| 379 | for (Field field : fields) |
| 380 | { |
| 381 | int mod = field.getModifiers(); |
| 382 | |
| 383 | if (java.lang.reflect.Modifier.isStatic(mod) && java.lang.reflect.Modifier.isFinal(mod) |
| 384 | && java.lang.reflect.Modifier.isPublic(mod)) |
| 385 | { |
| 386 | try |
| 387 | { |
| 388 | Object obj = field.get(null); |
| 389 | if (obj instanceof ObjectKey) |
| 390 | { |
| 391 | map.put(field.getName(), (ObjectKey<?>) obj); |
| 392 | } |
| 393 | } catch (IllegalArgumentException | IllegalAccessException e) |
| 394 | { |
| 395 | throw new UnreachableError(e); |
| 396 | } |
| 397 | } |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | @Override |
| 402 | public String toString() |
no test coverage detected