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<?>>primitiveWrapperMapMaps primitiveClasses to their corresponding wrapperClass.private static java.util.Map<java.lang.Class<?>,java.lang.Class<?>>wrapperPrimitiveMapMaps wrapperClasses 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 booleanisPrimitiveOrWrapper(java.lang.Class<?> type)Returns whether the giventypeis a primitive or primitive wrapper (Boolean,Byte,Character,Short,Integer,Long,Double,Float).static booleanisPrimitiveWrapper(java.lang.Class<?> type)Returns whether the giventypeis 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 primitiveClasses to their corresponding wrapperClass.
-
wrapperPrimitiveMap
private static final java.util.Map<java.lang.Class<?>,java.lang.Class<?>> wrapperPrimitiveMap
Maps wrapperClasses to their corresponding primitive types.
-
-
Method Detail
-
isPrimitiveOrWrapper
public static boolean isPrimitiveOrWrapper(java.lang.Class<?> type)
Returns whether the giventypeis 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
typeis 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 giventypeis a primitive wrapper (Boolean,Byte,Character,Short,Integer,Long,Double,Float).- Parameters:
type- The class to query or null.- Returns:
- true if the given
typeis a primitive wrapper (Boolean,Byte,Character,Short,Integer,Long,Double,Float). - Since:
- 3.1
-
-