MCPcopy Index your code
hub / github.com/apache/tomcat / isPrimitive

Method isPrimitive

java/org/apache/tomcat/websocket/Util.java:279–287  ·  view source on GitHub ↗

Returns whether the given class is a primitive type or its wrapper class. @param clazz The class to check @return true if the class is a primitive or wrapper type, false otherwise

(Class<?> clazz)

Source from the content-addressed store, hash-verified

277 * @return {@code true} if the class is a primitive or wrapper type, {@code false} otherwise
278 */
279 public static boolean isPrimitive(Class<?> clazz) {
280 if (clazz.isPrimitive()) {
281 return true;
282 } else {
283 return clazz.equals(Boolean.class) || clazz.equals(Byte.class) || clazz.equals(Character.class) ||
284 clazz.equals(Double.class) || clazz.equals(Float.class) || clazz.equals(Integer.class) ||
285 clazz.equals(Long.class) || clazz.equals(Short.class);
286 }
287 }
288
289
290 /**

Callers 15

sendObjectMethod · 0.95
validateTypeMethod · 0.95
MessageHandlerInfoMethod · 0.95
interpreterCallMethod · 0.80
interpreterCallMethod · 0.80
isBeanCompatibleMethod · 0.80
endMethod · 0.80
coerceToNumberMethod · 0.80
coerceToTypeMethod · 0.80

Calls 1

equalsMethod · 0.65

Tested by

no test coverage detected