()
| 725 | } |
| 726 | |
| 727 | private static void buildMap() |
| 728 | { |
| 729 | typeMap = new CaseInsensitiveMap<>(); |
| 730 | Field[] fields = JepCountType.class.getDeclaredFields(); |
| 731 | for (Field field : fields) |
| 732 | { |
| 733 | int mod = field.getModifiers(); |
| 734 | if (Modifier.isStatic(mod) && Modifier.isFinal(mod) && Modifier.isPublic(mod)) |
| 735 | { |
| 736 | try |
| 737 | { |
| 738 | Object obj = field.get(null); |
| 739 | if (obj instanceof JepCountType) |
| 740 | { |
| 741 | typeMap.put(field.getName(), (JepCountType) obj); |
| 742 | } |
| 743 | } catch (IllegalArgumentException | IllegalAccessException e) |
| 744 | { |
| 745 | throw new UnreachableError(e); |
| 746 | } |
| 747 | } |
| 748 | } |
| 749 | } |
| 750 | |
| 751 | /** |
| 752 | * Returns the constant for the given String (the search for the constant is |
no test coverage detected