code: public static SpreadMap toSpreadMap(Object[] self) {
          if (self == null)
              throw new GroovyRuntimeException("Fail to convert Object[] to SpreadMap, because it is null.");
          else if (self.length % 2 != 0)
              throw new GroovyRuntimeException("Fail to convert Object[] to SpreadMap, because it's size is not even.");
          else
              return new SpreadMap(self);
      }
docs: Creates a spreadable map from this array.
  <p>
  @param self an object array
  @return a newly created SpreadMap
  @see groovy.lang.SpreadMap#SpreadMap(java.lang.Object[])
  @see #toSpreadMap(java.util.Map)
  @since 1.0