Beispiel #1
0
 public Object computeReadValue() {
   Object readValue;
   try {
     readValue = MethodInvocationManager.invokeMethod(readMethod, parentObject, readMethodParams);
     return Util.deepCopy(readValue);
   } catch (Exception e) {
     return null;
   }
 }
Beispiel #2
0
  public void init(
      CommandListener theListener,
      MethodProxy theWriteMethod,
      Object theParentObject,
      Object[] theParams,
      MethodProxy theReadMethod // ,
      // Object[] theReadMethodParams
      ) {
    // frame = theFrame;
    writeMethod = theWriteMethod;
    // undoWriteMethod = uiBean.getUndo(theParentObject, writeMethod);
    // if (undoWriteMethod == null)
    undoWriteMethod = writeMethod;
    parentObject = theParentObject;
    params = theParams;
    readMethod = theReadMethod;
    // readMethodParams = theReadMethodParams;
    listener = theListener;
    undoWriteMethodParams = Util.copy(theParams);
    readMethodParams = createReadMethodParams(theParams);

    isVoid = theWriteMethod.getReturnType() == theWriteMethod.getDeclaringClass().voidType();
  }