List of utility methods to do Reflection Primitive
Class> | getPrimitiveClass(String primitiveClassName) get Primitive Class return primitiveClasses.get(primitiveClassName);
|
Class> | getPrimitiveClass(String primitiveName) get Primitive Class return nameToPrimitiveClass.get(primitiveName);
|
Class> | getPrimitiveClassIfWrapper(Class> clazz) get Primitive Class If Wrapper Class<?> ret = getPrimitiveClass(clazz); if (ret != null) { return ret; return clazz; |
Object | getPrimitiveDefault(Class> primitiveClazz) Returns the wrapper object of a given primitive Class with the default value return primitiveWrappersMap.get(primitiveClazz);
|
float | getPrimitivePromotionCost(final Class> srcClass, final Class> destClass) get Primitive Promotion Cost float cost = 0.0f; Class<?> cls = srcClass; if (!cls.isPrimitive()) { cost += 0.1f; cls = wrapperToPrimitive(cls); for (int i = 0; cls != destClass && i < ORDERED_PRIMITIVE_TYPES.length; i++) { if (cls == ORDERED_PRIMITIVE_TYPES[i]) { ... |
int | getPrimitiveSize(Class> type) get Primitive Size return primarySizeMapper.get(type);
|
Class> | getPrimitiveType(Class> clazz) get Primitive Type return CORRESPONDING_TYPES.containsKey(clazz) ? CORRESPONDING_TYPES.get(clazz) : clazz;
|
Class> | getPrimitiveType(String javaClassName) get Primitive Type return javaPrimitiveToType.get(javaClassName);
|
Class> | getPrimitiveWrapper(Class> primitiveType) Gets the wrapper object class for the given primitive type class. return primitiveTypeToWrapperMap.get(primitiveType);
|
int | getRank(Class aNumberClass) Gets the ordinal type rank of the given Number Class. Integer rank = (Integer) NUMBER_RANK_MAP.get(aNumberClass); assert rank != null; return rank.intValue(); |