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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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)