package java.lang.reflect {
import java.lang.Exception;
import String;
import java.lang.Throwable;
import java.lang.Arguments;
dynamic public class InvocationTargetException extends Exception {
  public function InvocationTargetException__(): Object {
    return this;
  }
  public function InvocationTargetException__Ljava_lang_Throwable_2(target: Throwable): Object {
    return this;
  }
  public function InvocationTargetException__Ljava_lang_Throwable_2Ljava_lang_String_2(target: Throwable, s: String): Object {
    return this;
  }
  public function InvocationTargetException(... vargs) {
    var args: Array;
    var id: int;
    if (vargs.length == 1 && vargs[0] is Arguments) {
      args = Arguments(vargs[0]).args;
      id = Arguments(vargs[0]).id;
    } else {
      if (vargs.length == 0) {
        id = 0;
      } else if (vargs.length == 1 && vargs[0] is Throwable) {
        args = vargs;
        id = 1;
      } else if (vargs.length == 2 && vargs[0] is Throwable && vargs[1] is String) {
        args = vargs;
        id = 2;
      }
    }
    switch (id) {
      case 0:
        var superArgs: Arguments;
        superArgs = new Arguments(java.lang.Exception.Exception__, []);
        break;
      case 1:
        var args1: Array = [args[0]];
        superArgs = new Arguments(java.lang.Exception.Exception__Ljava_lang_Throwable_2, [args1[0]]);
        break;
      case 2:
        var args2: Array = [args[0], args[1]];
        superArgs = new Arguments(java.lang.Exception.Exception__Ljava_lang_String_2Ljava_lang_Throwable_2, [args2[1], args2[0]]);
        break;
    }
    super(superArgs);
    switch (id) {
      case 0:
        InvocationTargetException__();
        break;
      case 1:
        InvocationTargetException__Ljava_lang_Throwable_2(args1[0]);
        break;
      case 2:
        InvocationTargetException__Ljava_lang_Throwable_2Ljava_lang_String_2(args2[0], args2[1]);
        break;
    }
  }
  public static const InvocationTargetException__ : int = 0;
  public static const InvocationTargetException__Ljava_lang_Throwable_2 : int = 1;
  public static const InvocationTargetException__Ljava_lang_Throwable_2Ljava_lang_String_2 : int = 2;
}
}
