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

Method createConstant

guava/src/com/google/common/net/MediaType.java:108–113  ·  view source on GitHub ↗
(String type, String subtype)

Source from the content-addressed store, hash-verified

106 private static final Map<MediaType, MediaType> knownTypes = new HashMap<>();
107
108 private static MediaType createConstant(String type, String subtype) {
109 MediaType mediaType =
110 addKnownType(new MediaType(type, subtype, ImmutableListMultimap.<String, String>of()));
111 mediaType.parsedCharset = Optional.absent();
112 return mediaType;
113 }
114
115 private static MediaType createConstantUtf8(String type, String subtype) {
116 MediaType mediaType = addKnownType(new MediaType(type, subtype, UTF_8_CONSTANT_PARAMETERS));

Callers 1

MediaTypeClass · 0.95

Calls 3

addKnownTypeMethod · 0.95
ofMethod · 0.95
absentMethod · 0.95

Tested by

no test coverage detected