MCPcopy Create free account
hub / github.com/PCGen/pcgen / buildMap

Method buildMap

code/src/java/pcgen/cdom/enumeration/ObjectKey.java:375–399  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()

Callers 4

ObjectKeyClass · 0.95
getKeyForMethod · 0.95
toStringMethod · 0.95
getAllConstantsMethod · 0.95

Calls 5

getModifiersMethod · 0.80
isStaticMethod · 0.65
getMethod · 0.65
putMethod · 0.65
getNameMethod · 0.65

Tested by

no test coverage detected