Beispiel #1
0
  public int getPid() {
    if (haxe.root.Reflect.hasField(this.proc, "pid")) {
      return haxe.lang.Runtime.toInt(haxe.lang.Runtime.getField(this.proc, "pid", false));
    }

    return -1;
  }
Beispiel #2
0
 public static haxe.root.Date fromUTC(
     int year,
     int month,
     int day,
     java.lang.Object hour,
     java.lang.Object min,
     java.lang.Object sec,
     java.lang.Object millisec) {
   int __temp_millisec5 =
       (((millisec == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(millisec)))));
   int __temp_sec4 = (((sec == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(sec)))));
   int __temp_min3 = (((min == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(min)))));
   int __temp_hour2 =
       (((hour == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(hour)))));
   haxe.root.Date d =
       new haxe.root.Date(
           ((int) (year)),
           ((int) (month)),
           ((int) (day)),
           ((java.lang.Object) (__temp_hour2)),
           ((java.lang.Object) (__temp_min3)),
           ((java.lang.Object) (__temp_sec4)),
           ((java.lang.Object) (__temp_millisec5)));
   return haxe.root.Date.fromTime(
       ((((((double) (d.date.getTime())) / 1000) + d.timezoneOffset())) * 1000));
 }
Beispiel #3
0
 public java.lang.String getTag() {
   java.lang.Object cl = haxe.root.Type.getEnum(((java.lang.Object) (this)));
   return haxe.lang.Runtime.toString(
       haxe.lang.Runtime.callField(
           haxe.lang.Runtime.getField(cl, "constructs", true),
           "__get",
           new haxe.root.Array(new java.lang.Object[] {this.index})));
 }
Beispiel #4
0
 public <T> void add(T x) {
   if (haxe.lang.Runtime.isInt(x)) {
     int x1 = ((int) (haxe.lang.Runtime.toInt(((java.lang.Object) (x)))));
     java.lang.Object xd = x1;
     this.b.append(((java.lang.Object) (xd)));
   } else {
     this.b.append(((java.lang.Object) (x)));
   }
 }
Beispiel #5
0
 public static java.lang.Object __hx_create(haxe.root.Array arr) {
   return new haxe.root.Date(
       ((int) (haxe.lang.Runtime.toInt(arr.__get(0)))),
       ((int) (haxe.lang.Runtime.toInt(arr.__get(1)))),
       ((int) (haxe.lang.Runtime.toInt(arr.__get(2)))),
       ((java.lang.Object) (arr.__get(3))),
       ((java.lang.Object) (arr.__get(4))),
       ((java.lang.Object) (arr.__get(5))),
       ((java.lang.Object) (arr.__get(6))));
 }
Beispiel #6
0
  @Override
  public java.lang.Object __hx_getField(
      java.lang.String field, boolean throwErrors, boolean isCheck, boolean handleProperties) {
    {
      boolean __temp_executeDef3283 = true;
      switch (field.hashCode()) {
        case -1776922004:
          {
            if (field.equals("toString")) {
              __temp_executeDef3283 = false;
              return ((haxe.lang.Function)
                  (new haxe.lang.Closure(
                      ((java.lang.Object) (this)), haxe.lang.Runtime.toString("toString"))));
            }

            break;
          }

        case 98:
          {
            if (field.equals("b")) {
              __temp_executeDef3283 = false;
              return this.b;
            }

            break;
          }

        case 96417:
          {
            if (field.equals("add")) {
              __temp_executeDef3283 = false;
              return ((haxe.lang.Function)
                  (new haxe.lang.Closure(
                      ((java.lang.Object) (this)), haxe.lang.Runtime.toString("add"))));
            }

            break;
          }
      }

      if (__temp_executeDef3283) {
        return super.__hx_getField(field, throwErrors, isCheck, handleProperties);
      } else {
        throw null;
      }
    }
  }
Beispiel #7
0
  @Override
  public java.lang.Object __hx_getField(
      java.lang.String field, boolean throwErrors, boolean isCheck, boolean handleProperties) {
    {
      boolean __temp_executeDef58 = true;
      switch (field.hashCode()) {
        case -1776922004:
          {
            if (field.equals("toString")) {
              __temp_executeDef58 = false;
              return ((haxe.lang.Function)
                  (new haxe.lang.Closure(
                      ((java.lang.Object) (this)), haxe.lang.Runtime.toString("toString"))));
            }

            break;
          }

        case 3076014:
          {
            if (field.equals("date")) {
              __temp_executeDef58 = false;
              return this.date;
            }

            break;
          }

        case -201721364:
          {
            if (field.equals("timezoneOffset")) {
              __temp_executeDef58 = false;
              return ((haxe.lang.Function)
                  (new haxe.lang.Closure(
                      ((java.lang.Object) (this)), haxe.lang.Runtime.toString("timezoneOffset"))));
            }

            break;
          }
      }

      if (__temp_executeDef58) {
        return super.__hx_getField(field, throwErrors, isCheck, handleProperties);
      } else {
        throw null;
      }
    }
  }
Beispiel #8
0
  public static java.lang.Object handleGetField(
      java.lang.String str, java.lang.String f, boolean throwErrors) {
    {
      java.lang.String __temp_svar48 = (f);
      int __temp_hash50 = __temp_svar48.hashCode();
      boolean __temp_executeDef49 = true;
      switch (__temp_hash50) {
        case -1106363674:
          {
            if (__temp_svar48.equals("length")) {
              __temp_executeDef49 = false;
              return str.length();
            }

            break;
          }

        case 530542161:
        case -891529231:
        case 109648666:
        case -467511597:
        case 1943291465:
        case 397153782:
        case -1361633751:
        case -1137582698:
        case -399551817:
          {
            if (((((__temp_hash50 == 530542161) && __temp_svar48.equals("substring")))
                || ((((__temp_hash50 == -891529231) && __temp_svar48.equals("substr")))
                    || ((((__temp_hash50 == 109648666) && __temp_svar48.equals("split")))
                        || ((((__temp_hash50 == -467511597) && __temp_svar48.equals("lastIndexOf")))
                            || ((((__temp_hash50 == 1943291465) && __temp_svar48.equals("indexOf")))
                                || ((((__temp_hash50 == 397153782)
                                        && __temp_svar48.equals("charCodeAt")))
                                    || ((((__temp_hash50 == -1361633751)
                                            && __temp_svar48.equals("charAt")))
                                        || ((((__temp_hash50 == -1137582698)
                                                && __temp_svar48.equals("toLowerCase")))
                                            || __temp_svar48.equals("toUpperCase")))))))))) {
              __temp_executeDef49 = false;
              return new haxe.lang.Closure(
                  ((java.lang.Object) (str)), haxe.lang.Runtime.toString(f));
            }

            break;
          }
      }

      if (__temp_executeDef49) {
        if (throwErrors) {
          throw haxe.lang.HaxeException.wrap((("Field not found: \'" + f) + "\' in String"));
        } else {
          return null;
        }

      } else {
        throw null;
      }
    }
  }
Beispiel #9
0
  public static void __hx_ctor__Date(
      haxe.root.Date __temp_me11,
      int year,
      int month,
      int day,
      java.lang.Object hour,
      java.lang.Object min,
      java.lang.Object sec,
      java.lang.Object millisec) {
    int __temp_millisec10 =
        (((millisec == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(millisec)))));
    int __temp_sec9 = (((sec == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(sec)))));
    int __temp_min8 = (((min == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(min)))));
    int __temp_hour7 =
        (((hour == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(hour)))));
    if ((year != 0)) {
      year = (year - 1900);
    } else {
      year = 0;
    }

    __temp_me11.date =
        new java.util.Date(
            ((int) (year)),
            ((int) (month)),
            ((int) (day)),
            ((int) (__temp_hour7)),
            ((int) (__temp_min8)),
            ((int) (__temp_sec9)));
    if ((__temp_millisec10 > 0)) {
      long __temp_stmt60 = 0L;
      {
        long a = __temp_me11.date.getTime();
        long b = 0L;
        {
          long i = 0L;
          i = ((long) (((((long) (0)) << 32) | (__temp_millisec10 & 0xffffffffL))));
          b = i;
        }

        __temp_stmt60 = ((long) ((((long) (a)) + ((long) (b)))));
      }

      __temp_me11.date = new java.util.Date(((long) (__temp_stmt60)));
    }
  }
Beispiel #10
0
  public static java.lang.Object handleCallField(
      java.lang.String str, java.lang.String f, haxe.root.Array args) {
    haxe.root.Array _args = new haxe.root.Array(new java.lang.Object[] {str});
    if ((args == null)) {
      args = _args;
    } else {
      args = _args.concat(args);
    }

    return haxe.lang.Runtime.slowCallField(haxe.lang.StringExt.class, f, args);
  }
Beispiel #11
0
  @Override
  public boolean equals(java.lang.Object obj) {
    if (haxe.lang.Runtime.eq(obj, this)) {
      return true;
    }

    haxe.lang.Enum obj1 = ((haxe.lang.Enum) (obj));
    boolean ret =
        (((obj1 != null)
                && haxe.root.Std.is(obj1, haxe.root.Type.getEnum(((java.lang.Object) (this)))))
            && (obj1.index == this.index));
    if (!(ret)) {
      return false;
    }

    if ((obj1.params == this.params)) {
      return true;
    }

    int len = 0;
    if ((((obj1.params == null) || (this.params == null))
        || ((len = this.params.length) != obj1.params.length))) {
      return false;
    }

    {
      int _g = 0;
      while ((_g < len)) {
        int i = _g++;
        if (!(haxe.root.Type.enumEq(obj1.params.__get(i), this.params.__get(i)))) {
          return false;
        }
      }
    }

    return true;
  }
Beispiel #12
0
  public static haxe.root.Date fromString(java.lang.String s, java.lang.Object isUtc) {
    boolean __temp_isUtc6 =
        (((isUtc == null)) ? (haxe.lang.Runtime.toBool(false)) : (haxe.lang.Runtime.toBool(isUtc)));
    int _g = s.length();
    switch (_g) {
      case 8:
        {
          haxe.root.Array<java.lang.String> k = haxe.lang.StringExt.split(s, ":");
          if (__temp_isUtc6) {
            return haxe.root.Date.fromUTC(
                0,
                0,
                1,
                haxe.root.Std.parseInt(k.__get(0)),
                haxe.root.Std.parseInt(k.__get(1)),
                haxe.root.Std.parseInt(k.__get(2)),
                null);
          } else {
            return new haxe.root.Date(
                ((int) (0)),
                ((int) (0)),
                ((int) (1)),
                ((java.lang.Object) (haxe.root.Std.parseInt(k.__get(0)))),
                ((java.lang.Object) (haxe.root.Std.parseInt(k.__get(1)))),
                ((java.lang.Object) (haxe.root.Std.parseInt(k.__get(2)))),
                ((java.lang.Object) (null)));
          }
        }

      case 10:
        {
          haxe.root.Array<java.lang.String> k = haxe.lang.StringExt.split(s, "-");
          if (__temp_isUtc6) {
            return haxe.root.Date.fromUTC(
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(0))))),
                (((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(1)))))
                    - ((int) (1))),
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(2))))),
                null,
                null,
                null,
                null);
          } else {
            return new haxe.root.Date(
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(0))))),
                ((int)
                    ((((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(1)))))
                        - ((int) (1))))),
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(2))))),
                ((java.lang.Object) (null)),
                ((java.lang.Object) (null)),
                ((java.lang.Object) (null)),
                ((java.lang.Object) (null)));
          }
        }

      case 19:
        {
          haxe.root.Array<java.lang.String> k = haxe.lang.StringExt.split(s, " ");
          haxe.root.Array<java.lang.String> y = haxe.lang.StringExt.split(k.__get(0), "-");
          haxe.root.Array<java.lang.String> t = haxe.lang.StringExt.split(k.__get(1), ":");
          if (__temp_isUtc6) {
            return haxe.root.Date.fromUTC(
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(0))))),
                (((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(1)))))
                    - ((int) (1))),
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(2))))),
                haxe.root.Std.parseInt(t.__get(0)),
                haxe.root.Std.parseInt(t.__get(1)),
                haxe.root.Std.parseInt(t.__get(2)),
                null);
          } else {
            return new haxe.root.Date(
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(0))))),
                ((int)
                    ((((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(1)))))
                        - ((int) (1))))),
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(2))))),
                ((java.lang.Object) (haxe.root.Std.parseInt(t.__get(0)))),
                ((java.lang.Object) (haxe.root.Std.parseInt(t.__get(1)))),
                ((java.lang.Object) (haxe.root.Std.parseInt(t.__get(2)))),
                ((java.lang.Object) (null)));
          }
        }

      default:
        {
          throw haxe.lang.HaxeException.wrap(("Invalid date format : " + s));
        }
    }
  }
Beispiel #13
0
 public static java.lang.Object __hx_create(haxe.root.Array arr) {
   return new sys.io.Process(
       haxe.lang.Runtime.toString(arr.__get(0)),
       ((haxe.root.Array<java.lang.String>) (arr.__get(1))));
 }