类 Result.CompatibleResult

    • 构造器详细资料

      • CompatibleResult

        public CompatibleResult​(Result result)
    • 方法详细资料

      • getDelegate

        public Result getDelegate()
      • getValue

        public Object getValue()
        从接口复制的说明: Result
        Get invoke result.
        返回:
        result. if no result return null.
      • getException

        public Throwable getException()
        从接口复制的说明: Result
        Get exception.
        返回:
        exception. if no exception return null.
      • setException

        public void setException​(Throwable t)
      • hasException

        public boolean hasException()
        从接口复制的说明: Result
        Has exception.
        返回:
        has exception.
      • recreate

        public Object recreate()
                        throws Throwable
        从接口复制的说明: Result
        Recreate.

        if (hasException()) { throw getException(); } else { return getValue(); }

        返回:
        result.
        抛出:
        Throwable
      • getAttachments

        public Map<String,​String> getAttachments()
        从接口复制的说明: Result
        get attachments.
        返回:
        attachments.
      • addAttachments

        public void addAttachments​(Map<String,​String> map)
        从接口复制的说明: Result
        Add the specified map to existing attachments in this instance.
      • setAttachments

        public void setAttachments​(Map<String,​String> map)
        从接口复制的说明: Result
        Replace the existing attachments with the specified param.
      • getAttachment

        public String getAttachment​(String key)
        从接口复制的说明: Result
        get attachment by key.
        返回:
        attachment value.
      • getAttachment

        public String getAttachment​(String key,
                                    String defaultValue)
        从接口复制的说明: Result
        get attachment by key with default value.
        返回:
        attachment value.
      • setAttachment

        public void setAttachment​(String key,
                                  String value)
      • setAttachment

        public void setAttachment​(String key,
                                  Object value)
      • setObjectAttachment

        public void setObjectAttachment​(String key,
                                        Object value)