MCPcopy
hub / github.com/google/guava / getEnumConstants

Method getEnumConstants

guava/src/com/google/common/base/Enums.java:86–95  ·  view source on GitHub ↗
(
      Class<T> enumClass)

Source from the content-addressed store, hash-verified

84 }
85
86 static <T extends Enum<T>> Map<String, WeakReference<? extends Enum<?>>> getEnumConstants(
87 Class<T> enumClass) {
88 synchronized (enumConstantCache) {
89 Map<String, WeakReference<? extends Enum<?>>> constants = enumConstantCache.get(enumClass);
90 if (constants == null) {
91 constants = populateCache(enumClass);
92 }
93 return constants;
94 }
95 }
96
97 /**
98 * Returns a serializable converter that converts between strings and {@code enum} values of type

Callers 11

getEnumIfPresentMethod · 0.95
EnumMultisetMethod · 0.45
readObjectMethod · 0.45
getBestComparatorMethod · 0.45
createNodesMethod · 0.45
getBestValidatorMethod · 0.45
setUpMethod · 0.45
doTestClassUnloadingMethod · 0.45
generateMethod · 0.45
instantiateMethod · 0.45
getMethod · 0.45

Calls 2

populateCacheMethod · 0.95
getMethod · 0.65

Tested by 5

setUpMethod · 0.36
doTestClassUnloadingMethod · 0.36
generateMethod · 0.36
instantiateMethod · 0.36
getMethod · 0.36