Package com.esotericsoftware.kryo.util
Class Util
java.lang.Object
com.esotericsoftware.kryo.util.Util
A few utility methods, mostly for private use.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns the class formatted as a string.static int
getDimensionCount
(Class arrayClass) Returns the number of dimensions of an array.static Class
getElementClass
(Class arrayClass) Returns the base element type of an n-dimensional array class.static Class
getPrimitiveClass
(Class type) Returns the primitive class for a primitive wrapper class.static Class
getWrapperClass
(Class type) Returns the primitive wrapper class for a primitive class.static boolean
isClassAvailable
(String className) static boolean
isWrapperClass
(Class type) static void
Logs a message about an object.static String
Returns the object formatted as a string.
-
Field Details
-
isAndroid
public static final boolean isAndroid -
maxArraySize
public static final int maxArraySize- See Also:
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
isClassAvailable
-
getWrapperClass
Returns the primitive wrapper class for a primitive class.- Parameters:
type
- Must be a primitive class.
-
getPrimitiveClass
Returns the primitive class for a primitive wrapper class. Otherwise returns the type parameter.- Parameters:
type
- Must be a wrapper class.
-
isWrapperClass
-
log
Logs a message about an object. The log level and the string format of the object depend on the object type. -
string
Returns the object formatted as a string. The format depends on the object's type and whetherObject.toString()
has been overridden. -
className
Returns the class formatted as a string. The format varies depending on the type. -
getDimensionCount
Returns the number of dimensions of an array. -
getElementClass
Returns the base element type of an n-dimensional array class.
-