Package com.github.javaparser.utils
Class ClassUtils
- java.lang.Object
-
- com.github.javaparser.utils.ClassUtils
-
public class ClassUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>>
primitiveWrapperMap
Maps primitiveClass
es to their corresponding wrapperClass
.private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>>
wrapperPrimitiveMap
Maps wrapperClass
es to their corresponding primitive types.
-
Constructor Summary
Constructors Constructor Description ClassUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isPrimitiveOrWrapper(java.lang.Class<?> type)
Returns whether the giventype
is a primitive or primitive wrapper (Boolean
,Byte
,Character
,Short
,Integer
,Long
,Double
,Float
).static boolean
isPrimitiveWrapper(java.lang.Class<?> type)
Returns whether the giventype
is a primitive wrapper (Boolean
,Byte
,Character
,Short
,Integer
,Long
,Double
,Float
).
-
-
-
Field Detail
-
primitiveWrapperMap
private static final java.util.Map<java.lang.Class<?>,java.lang.Class<?>> primitiveWrapperMap
Maps primitiveClass
es to their corresponding wrapperClass
.
-
wrapperPrimitiveMap
private static final java.util.Map<java.lang.Class<?>,java.lang.Class<?>> wrapperPrimitiveMap
Maps wrapperClass
es to their corresponding primitive types.
-
-
Method Detail
-
isPrimitiveOrWrapper
public static boolean isPrimitiveOrWrapper(java.lang.Class<?> type)
Returns whether the giventype
is a primitive or primitive wrapper (Boolean
,Byte
,Character
,Short
,Integer
,Long
,Double
,Float
).- Parameters:
type
- The class to query or null.- Returns:
- true if the given
type
is a primitive or primitive wrapper (Boolean
,Byte
,Character
,Short
,Integer
,Long
,Double
,Float
).
-
isPrimitiveWrapper
public static boolean isPrimitiveWrapper(java.lang.Class<?> type)
Returns whether the giventype
is a primitive wrapper (Boolean
,Byte
,Character
,Short
,Integer
,Long
,Double
,Float
).- Parameters:
type
- The class to query or null.- Returns:
- true if the given
type
is a primitive wrapper (Boolean
,Byte
,Character
,Short
,Integer
,Long
,Double
,Float
). - Since:
- 3.1
-
-