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

Method forNamePrimitive

java/org/apache/el/util/ReflectionUtil.java:87–95  ·  view source on GitHub ↗

Looks up a primitive class by name. @param name the primitive type name @return the corresponding Class object, or null if not a primitive

(String name)

Source from the content-addressed store, hash-verified

85 * @return the corresponding Class object, or {@code null} if not a primitive
86 */
87 protected static Class<?> forNamePrimitive(String name) {
88 if (name.length() <= 8) {
89 int p = Arrays.binarySearch(PRIMITIVE_NAMES, name);
90 if (p >= 0) {
91 return PRIMITIVES[p];
92 }
93 }
94 return null;
95 }
96
97 /**
98 * Converts an array of Class names to Class types.

Callers 1

forNameMethod · 0.95

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected