MCPcopy Index your code
hub / github.com/OpenFeign/feign / emptyValueOf

Method emptyValueOf

core/src/main/java/feign/Util.java:214–216  ·  view source on GitHub ↗

This returns well known empty values for well-known java types. This returns null for types not in the following list. [Bb]oolean byte[] Collection Iterator List Map Set When {@link Feig

(Type type)

Source from the content-addressed store, hash-verified

212 * looking at the raw type (vs type hierarchy). Decorate for sophistication.
213 */
214 public static Object emptyValueOf(Type type) {
215 return EMPTIES.getOrDefault(Types.getRawType(type), () -> null).get();
216 }
217
218 private static final Map<Class<?>, Supplier<Object>> EMPTIES;
219

Callers 15

decodeMethod · 0.95
decodeMethod · 0.95
decodeMethod · 0.95
decodeMethod · 0.95
decodeMethod · 0.95
decodeMethod · 0.95
decodeMethod · 0.95
emptyValueOfMethod · 0.95
decodeMethod · 0.95
decodeMethod · 0.95

Calls 2

getRawTypeMethod · 0.95
getMethod · 0.65

Tested by 3

emptyValueOfMethod · 0.76