public class Util extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
IS_ANDROID |
static boolean |
isAndroid
Deprecated.
Use
IS_ANDROID instead. |
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
className(Class type)
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 |
log(String message,
Object object)
Logs a message about an object.
|
static String |
string(Object object)
Returns the object formatted as a string.
|
static int |
swapInt(int i)
Converts an "int" value between endian systems.
|
static long |
swapLong(long value)
Converts a "long" value between endian systems.
|
public static final boolean IS_ANDROID
@Deprecated public static boolean isAndroid
IS_ANDROID
instead.public static boolean isClassAvailable(String className)
public static Class getWrapperClass(Class type)
type
- Must be a primitive class.public static Class getPrimitiveClass(Class type)
type
- Must be a wrapper class.public static boolean isWrapperClass(Class type)
public static void log(String message, Object object)
public static String string(Object object)
Object.toString()
has
been overridden.public static String className(Class type)
public static int getDimensionCount(Class arrayClass)
public static Class getElementClass(Class arrayClass)
public static int swapInt(int i)
public static long swapLong(long value)
Copyright © 2018. All rights reserved.