public class ClassUtils extends Object
This class handles invalid null inputs as best it can. Each method documents its
behavior in more detail.
The notion of a canonical name includes the human readable name for the type, for
example int[]. The non-canonical method variants work with the JVM names, such as [I.
| Constructor and Description |
|---|
ClassUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
primitiveToWrapper(Class<?> cls)
Converts the specified primitive Class object to its corresponding wrapper Class object.
|
public static Class<?> primitiveToWrapper(Class<?> cls)
NOTE: From v2.2, this method handles Void.TYPE, returning Void.TYPE.
cls - the class to convert, may be nullcls or cls if cls is not a primitive.
null if null input.Copyright © 2022 The Apache Software Foundation. All rights reserved.