Package net.minestom.server.utils
Class PrimitiveConversion
java.lang.Object
net.minestom.server.utils.PrimitiveConversion
public class PrimitiveConversion
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description PrimitiveConversion()
-
Method Summary
Modifier and Type Method Description static java.lang.Class
getObjectClass(java.lang.Class clazz)
Converts primitive types to their boxed version.static java.lang.String
getObjectClassString(java.lang.String clazz)
-
Constructor Details
-
PrimitiveConversion
public PrimitiveConversion()
-
-
Method Details
-
getObjectClass
public static java.lang.Class getObjectClass(java.lang.Class clazz)Converts primitive types to their boxed version.Used to avoid needing to double-check everything
- Parameters:
clazz
- the class to convert- Returns:
- the boxed class type of the primitive one,
clazz
otherwise
-
getObjectClassString
public static java.lang.String getObjectClassString(java.lang.String clazz)
-