Top Fields Constructors Methods
com.github.javaparser.utils

public Class ClassUtils

extends Object
Class Inheritance
Imports
java.util.HashMap, .Map

Field Summary

Modifier and TypeField and Description
private static final Map<Class<?>, Class<?>>
primitiveWrapperMap

Maps primitive Classes to their corresponding wrapper Class.

private static final Map<Class<?>, Class<?>>
wrapperPrimitiveMap

Maps wrapper Classes to their corresponding primitive types.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true if the given type is a primitive or primitive wrapper (Boolean, Byte, Character, Short, Integer, Long, Double, Float).
isPrimitiveOrWrapper
(final Class<?>
The class to query or null.
type
)

Returns whether the given type is a primitive or primitive wrapper (Boolean, Byte, Character, Short, Integer, Long, Double, Float).

public static boolean

Returns:

true if the given type is a primitive wrapper (Boolean, Byte, Character, Short, Integer, Long, Double, Float).
isPrimitiveWrapper
(final Class<?>
The class to query or null.
type
)

Returns whether the given type is a primitive wrapper (Boolean, Byte, Character, Short, Integer, Long, Double, Float).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

primitiveWrapperMapback to summary
private static final Map<Class<?>, Class<?>> primitiveWrapperMap

Maps primitive Classes to their corresponding wrapper Class.

wrapperPrimitiveMapback to summary
private static final Map<Class<?>, Class<?>> wrapperPrimitiveMap

Maps wrapper Classes to their corresponding primitive types.

Constructor Detail

ClassUtilsback to summary
public ClassUtils()

Method Detail

isPrimitiveOrWrapperback to summary
public static boolean isPrimitiveOrWrapper(final Class<?> type)

Returns whether the given type is a primitive or primitive wrapper (Boolean, Byte, Character, Short, Integer, Long, Double, Float).

Parameters
type:Class<?>

The class to query or null.

Returns:boolean

true if the given type is a primitive or primitive wrapper (Boolean, Byte, Character, Short, Integer, Long, Double, Float).

isPrimitiveWrapperback to summary
public static boolean isPrimitiveWrapper(final Class<?> type)

Returns whether the given type is a primitive wrapper (Boolean, Byte, Character, Short, Integer, Long, Double, Float).

Parameters
type:Class<?>

The class to query or null.

Returns:boolean

true if the given type is a primitive wrapper (Boolean, Byte, Character, Short, Integer, Long, Double, Float).

Since
3.1