use of com.ikoori.vip.server.common.constant.factory.IConstantFactory in project vip by guangdada.
the class DictFieldWarpperFactory method createFieldWarpper.
public static Object createFieldWarpper(Object field, String methodName) {
IConstantFactory me = ConstantFactory.me();
try {
Method method = IConstantFactory.class.getMethod(methodName, field.getClass());
Object result = method.invoke(me, field);
return result;
} catch (Exception e) {
try {
Method method = IConstantFactory.class.getMethod(methodName, Integer.class);
Object result = method.invoke(me, Integer.parseInt(field.toString()));
return result;
} catch (Exception e1) {
throw new BussinessException(BizExceptionEnum.ERROR_WRAPPER_FIELD);
}
}
}
Aggregations