--- /dev/null
+package com.pentila.evalcomp.client.examen;
+
+import com.gwtent.reflection.client.ClassType;
+import com.gwtent.reflection.client.TypeOracle;
+import com.pentila.evalcomp.domain.examen.Question;
+
+public class QuestionUtil {
+
+
+ static ClassType<Question> classType = TypeOracle.Instance.getClassType(Question.class);
+
+ public static Object apply(String type, FieldData field, Object object, Object ...args){
+
+ Object o = null;
+ try{
+ o = classType.invoke(object,
+ getMethodName(field.getFieldName(), type), args);
+ }catch (Exception e){
+ //e.printStackTrace();
+ }
+ return o;
+
+ }
+
+ public static String getMethodName(String fieldName, String type) {
+
+ String f = fieldName.substring(0, 1).toUpperCase();
+ String end = fieldName.substring(1);
+
+ String methodName = type + f + end;
+
+ return methodName;
+
+ }
+
+
+
+}