Пример #1
0
 public void setValue(Object target, Object value) {
   try {
     method.invoke(target, value);
   } catch (InvocationTargetException e) {
     throw UncheckedException.unwrapAndRethrow(e);
   } catch (Exception e) {
     throw UncheckedException.throwAsUncheckedException(e);
   }
 }
Пример #2
0
 public F getValue(T target) {
   try {
     return returnType.cast(method.invoke(target));
   } catch (InvocationTargetException e) {
     throw UncheckedException.unwrapAndRethrow(e);
   } catch (Exception e) {
     throw UncheckedException.throwAsUncheckedException(e);
   }
 }