MCPcopy Create free account
hub / github.com/antlr/codebuff / getEnumConstants

Method getEnumConstants

corpus/java/training/guava/base/Enums.java:95–105  ·  view source on GitHub ↗
(
      Class<T> enumClass)

Source from the content-addressed store, hash-verified

93 }
94
95 @GwtIncompatible // java.lang.ref.WeakReference
96 static <T extends Enum<T>> Map<String, WeakReference<? extends Enum<?>>> getEnumConstants(
97 Class<T> enumClass) {
98 synchronized (enumConstantCache) {
99 Map<String, WeakReference<? extends Enum<?>>> constants = enumConstantCache.get(enumClass);
100 if (constants == null) {
101 constants = populateCache(enumClass);
102 }
103 return constants;
104 }
105 }
106
107 /**
108 * Returns a converter that converts between strings and {@code enum} values of type

Callers 6

getEnumIfPresentMethod · 0.95
EnumHashBiMapMethod · 0.45
readObjectMethod · 0.45
getBestComparatorMethod · 0.45
createNodesMethod · 0.45
getBestValidatorMethod · 0.45

Calls 2

populateCacheMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected