@Test public void testGetPrimitiveClass() { assertEquals(int.class, ServiceMethodTranslator.getPrimitiveClass(PARAM_2_TYPE)); assertEquals(long.class, ServiceMethodTranslator.getPrimitiveClass(PARAM_3_TYPE)); assertEquals(double.class, ServiceMethodTranslator.getPrimitiveClass(PARAM_4_TYPE)); assertEquals(float.class, ServiceMethodTranslator.getPrimitiveClass(PARAM_5_TYPE)); assertEquals(byte.class, ServiceMethodTranslator.getPrimitiveClass(PARAM_6_TYPE)); assertEquals(char.class, ServiceMethodTranslator.getPrimitiveClass(PARAM_7_TYPE)); assertEquals(boolean.class, ServiceMethodTranslator.getPrimitiveClass(PARAM_8_TYPE)); assertEquals(short.class, ServiceMethodTranslator.getPrimitiveClass(PARAM_9_TYPE)); }
static Class getPrimitiveClass(String parameter) { Class clazz = null; switch (arrayElement(JAVA_PRIMITIVES, parameter)) { case 0: clazz = int.class; break; case 1: clazz = long.class; break; case 2: clazz = double.class; break; case 3: clazz = float.class; break; case 4: clazz = byte.class; break; case 5: clazz = char.class; break; case 6: clazz = boolean.class; break; case 7: clazz = short.class; break; default: } return clazz; }
ServiceMethodTranslator { static Class getPrimitiveClass(String parameter) { Class clazz = null; switch (arrayElement(JAVA_PRIMITIVES, parameter)) { case 0: clazz = int.class; break; case 1: clazz = long.class; break; case 2: clazz = double.class; break; case 3: clazz = float.class; break; case 4: clazz = byte.class; break; case 5: clazz = char.class; break; case 6: clazz = boolean.class; break; case 7: clazz = short.class; break; default: } return clazz; } }
ServiceMethodTranslator { static Class getPrimitiveClass(String parameter) { Class clazz = null; switch (arrayElement(JAVA_PRIMITIVES, parameter)) { case 0: clazz = int.class; break; case 1: clazz = long.class; break; case 2: clazz = double.class; break; case 3: clazz = float.class; break; case 4: clazz = byte.class; break; case 5: clazz = char.class; break; case 6: clazz = boolean.class; break; case 7: clazz = short.class; break; default: } return clazz; }  }
ServiceMethodTranslator { static Class getPrimitiveClass(String parameter) { Class clazz = null; switch (arrayElement(JAVA_PRIMITIVES, parameter)) { case 0: clazz = int.class; break; case 1: clazz = long.class; break; case 2: clazz = double.class; break; case 3: clazz = float.class; break; case 4: clazz = byte.class; break; case 5: clazz = char.class; break; case 6: clazz = boolean.class; break; case 7: clazz = short.class; break; default: } return clazz; }  static int getMethodIndex(String [] methodsArray, String methodName); static String getMethodName(String [] methodsArray, int index); static String getMethodSignature(String [] methodsArray, int index); static int getParameterNumber(String methodName); static String getMethodParameterType(String methodName, int parameter); static String getMethodParameterTypeCapitalised(String methodName, int parameter); static String [] getMethodParameterTypesCapitalised(String methodName); static String [] getMethodParameterTypes(String methodName); static String getMethodParameterName(String methodName, int parameter); static String [] getMethodParameterNames(String methodName); static Class [] getParameterClasses(String methodName); }
ServiceMethodTranslator { static Class getPrimitiveClass(String parameter) { Class clazz = null; switch (arrayElement(JAVA_PRIMITIVES, parameter)) { case 0: clazz = int.class; break; case 1: clazz = long.class; break; case 2: clazz = double.class; break; case 3: clazz = float.class; break; case 4: clazz = byte.class; break; case 5: clazz = char.class; break; case 6: clazz = boolean.class; break; case 7: clazz = short.class; break; default: } return clazz; }  static int getMethodIndex(String [] methodsArray, String methodName); static String getMethodName(String [] methodsArray, int index); static String getMethodSignature(String [] methodsArray, int index); static int getParameterNumber(String methodName); static String getMethodParameterType(String methodName, int parameter); static String getMethodParameterTypeCapitalised(String methodName, int parameter); static String [] getMethodParameterTypesCapitalised(String methodName); static String [] getMethodParameterTypes(String methodName); static String getMethodParameterName(String methodName, int parameter); static String [] getMethodParameterNames(String methodName); static Class [] getParameterClasses(String methodName); static final String JAVA_LANG_PREFIX; static final String ANDROID_OS_PREFIX; static final String JAVA_PRIMITIVES; static final String JAVA_LANG_CLASSES; }