public final class Primitives
extends java.lang.Object
Constructor and Description |
---|
Primitives() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class |
box(java.lang.Class type)
Get the boxed type for a primitive.
|
static boolean |
isBoxed(java.lang.Class type)
Check for a boxed type.
|
static java.lang.Class |
primitiveType(java.lang.String name)
Get the primitive type by name.
|
static char |
representingChar(java.lang.Class type)
Get the representing character of a primitive type.
|
static java.lang.Class |
unbox(java.lang.Class type)
Get the primitive type for a boxed one.
|
public static java.lang.Class box(java.lang.Class type)
type
- the primitive typepublic static java.lang.Class unbox(java.lang.Class type)
type
- the boxed typepublic static boolean isBoxed(java.lang.Class type)
type
- the type to checktrue
if the type is boxedpublic static java.lang.Class primitiveType(java.lang.String name)
name
- the name of the typenull
public static char representingChar(java.lang.Class type)
type
- the primitive typeCopyright © 2004–2016 XStream. All rights reserved.