示例#1
0
    @Override
    public void merge(org.objectfabric.TObject.Version next) {
      MethodCallBase.Version source = (MethodCallBase.Version) next;

      if (source.hasBits()) {
        if (source.getBit(TARGET_INDEX)) _target = source._target;

        if (source.getBit(IS_DONE_INDEX)) _isDone = source._isDone;

        if (source.getBit(RESULT__INDEX)) _result_ = source._result_;

        if (source.getBit(EXCEPTION_INDEX)) _exception = source._exception;
      }

      super.merge(next);
    }
示例#2
0
 @Override
 public void setAsObject(int index, java.lang.Object value) {
   switch (index) {
     case TARGET_INDEX:
       _target = (org.objectfabric.TGenerated) value;
       break;
     case IS_DONE_INDEX:
       _isDone = ((java.lang.Boolean) value).booleanValue();
       break;
     case RESULT__INDEX:
       _result_ = value;
       break;
     case EXCEPTION_INDEX:
       _exception = (java.lang.String) value;
       break;
     default:
       super.setAsObject(index, value);
       break;
   }
 }
示例#3
0
    @Override
    public void readWrite(org.objectfabric.Reader reader, int index, java.lang.Object[] versions) {
      if (reader.interrupted()) reader.resume();

      switch (index) {
        case TARGET_INDEX:
          {
            java.lang.Object value = reader.readTObject();

            if (reader.interrupted()) {
              reader.interrupt(null);
              return;
            }

            for (int i = versions.length - 1; i >= 0; i--) {
              java.lang.Object v =
                  value instanceof org.objectfabric.TObject[]
                      ? ((org.objectfabric.TObject[]) value)[i]
                      : value;
              ((Version) versions[i])._target = (org.objectfabric.TGenerated) v;
            }

            break;
          }
        case IS_DONE_INDEX:
          {
            if (!reader.canReadBoolean()) {
              reader.interrupt(null);
              return;
            }

            boolean value = reader.readBoolean();

            for (int i = versions.length - 1; i >= 0; i--) ((Version) versions[i])._isDone = value;

            break;
          }
        case RESULT__INDEX:
          {
            java.lang.Object value = reader.readObject();

            if (reader.interrupted()) {
              reader.interrupt(null);
              return;
            }

            for (int i = versions.length - 1; i >= 0; i--) {
              java.lang.Object v =
                  value instanceof org.objectfabric.TObject[]
                      ? ((org.objectfabric.TObject[]) value)[i]
                      : value;
              ((Version) versions[i])._result_ = (java.lang.Object) v;
            }

            break;
          }
        case EXCEPTION_INDEX:
          {
            java.lang.String value = reader.readString();

            if (reader.interrupted()) {
              reader.interrupt(null);
              return;
            }

            for (int i = versions.length - 1; i >= 0; i--)
              ((Version) versions[i])._exception = value;

            break;
          }
        default:
          {
            super.readWrite(reader, index, versions);

            if (reader.interrupted()) {
              reader.interrupt(null);
              return;
            }

            break;
          }
      }
    }
示例#4
0
    @Override
    public void writeWrite(org.objectfabric.Writer writer, int index) {
      if (writer.interrupted()) writer.resume();

      switch (index) {
        case TARGET_INDEX:
          {
            writer.writeTObject(_target);

            if (writer.interrupted()) {
              writer.interrupt(null);
              return;
            }

            break;
          }
        case IS_DONE_INDEX:
          {
            if (!writer.canWriteBoolean()) {
              writer.interrupt(null);
              return;
            }

            writer.writeBoolean(_isDone);
            break;
          }
        case RESULT__INDEX:
          {
            writer.writeObject(_result_);

            if (writer.interrupted()) {
              writer.interrupt(null);
              return;
            }

            break;
          }
        case EXCEPTION_INDEX:
          {
            writer.writeString(_exception);

            if (writer.interrupted()) {
              writer.interrupt(null);
              return;
            }

            break;
          }
        default:
          {
            super.writeWrite(writer, index);

            if (writer.interrupted()) {
              writer.interrupt(null);
              return;
            }

            break;
          }
      }
    }