goog.module('trycatch.TryCatch$impl');

const j_l_Object = goog.require('java.lang.Object$impl');
const $Util = goog.require('nativebootstrap.Util$impl');

let ClassCastException = goog.forwardDeclare('java.lang.ClassCastException$impl');
let Exception = goog.forwardDeclare('java.lang.Exception$impl');
let Throwable = goog.forwardDeclare('java.lang.Throwable$impl');
let InternalPreconditions = goog.forwardDeclare('javaemul.internal.InternalPreconditions$impl');
let $Casts = goog.forwardDeclare('vmbootstrap.Casts$impl');
let $Exceptions = goog.forwardDeclare('vmbootstrap.Exceptions$impl');

/**
 * @final
 */
class TryCatch extends j_l_Object {
 /** @protected @nodts */
 constructor() {
  super();
 }
 /** @nodts @return {!TryCatch} */
 static $create__() {
  TryCatch.$clinit();
  let $instance = new TryCatch();
  $instance.$ctor__trycatch_TryCatch__void();
  return $instance;
 }
 /** @nodts */
 $ctor__trycatch_TryCatch__void() {
  this.$ctor__java_lang_Object__void();
 }
 /** @final @nodts */
 m_testEmptyThrowableCatch__void() {
  try {
   throw $Exceptions.toJs(ClassCastException.$create__());
  } catch (__$jsexc) {}
  try {
   throw $Exceptions.toJs(ClassCastException.$create__());
  } catch (__$jsexc_1) {
   let __$exc = $Exceptions.toJava(__$jsexc_1);
   if (Exception.$isInstance(__$exc)) {} else {}
  }
 }
 /** @final @nodts */
 m_testEmptyThrowableRethrow__void() {
  try {
   throw $Exceptions.toJs(ClassCastException.$create__());
  } catch (__$jsexc) {
   let __$exc = $Exceptions.toJava(__$jsexc);
   {
    let e = /**@type {!Throwable}*/ (__$exc);
    throw $Exceptions.toJs(e);
   }
  }
 }
 /** @final @nodts */
 m_testFinally__void() {
  try {
   let b = 2;
  } finally {}
 }
 /** @final @nodts */
 m_testNestedTryCatch__void() {
  try {
   throw $Exceptions.toJs(Exception.$create__());
  } catch (__$jsexc) {
   let __$exc = $Exceptions.toJava(__$jsexc);
   if (Exception.$isInstance(__$exc)) {
    let ae = /**@type {!Exception}*/ (__$exc);
    try {
     throw $Exceptions.toJs(Exception.$create__());
    } catch (__$jsexc_1) {
     let __$exc_1 = $Exceptions.toJava(__$jsexc_1);
     if (Exception.$isInstance(__$exc_1)) {} else {
      throw $Exceptions.toJs(__$exc_1);
     }
    }
   } else {
    throw $Exceptions.toJs(__$exc);
   }
  }
 }
 /** @final @nodts */
 m_testThrowGenerics__void() {
  throw $Exceptions.toJs(/**@type {!Exception}*/ ($Casts.$to(this.m_getT__java_lang_Object__java_lang_Object_$p_trycatch_TryCatch(Exception.$create__()), Exception)));
 }
 /** @final @nodts @template T @return {T} */
 m_getT__java_lang_Object__java_lang_Object_$p_trycatch_TryCatch(/** T */ t) {
  return t;
 }
 /** @final @nodts */
 m_testThrowBoundGenerics__void() {
  throw $Exceptions.toJs(InternalPreconditions.m_checkNotNull__java_lang_Object__java_lang_Object(this.m_getThrowable__java_lang_Throwable_$p_trycatch_TryCatch()));
 }
 /** @final @nodts @template T @return {?T} */
 m_getThrowable__java_lang_Throwable_$p_trycatch_TryCatch() {
  return null;
 }
 /** @final @nodts @template T */
 m_testThrowsParameterized__java_lang_Throwable__void(/** T */ throwable) {
  throw $Exceptions.toJs(/**@type {!Throwable}*/ (throwable));
 }
 /** @nodts */
 static $clinit() {
  TryCatch.$clinit = () =>{};
  TryCatch.$loadModules();
  j_l_Object.$clinit();
 }
 /** @nodts @return {boolean} */
 static $isInstance(/** ? */ instance) {
  return instance instanceof TryCatch;
 }
 
 /** @nodts */
 static $loadModules() {
  ClassCastException = goog.module.get('java.lang.ClassCastException$impl');
  Exception = goog.module.get('java.lang.Exception$impl');
  InternalPreconditions = goog.module.get('javaemul.internal.InternalPreconditions$impl');
  $Casts = goog.module.get('vmbootstrap.Casts$impl');
  $Exceptions = goog.module.get('vmbootstrap.Exceptions$impl');
 }
}
$Util.$setClassMetadata(TryCatch, 'trycatch.TryCatch');

exports = TryCatch;

//# sourceMappingURL=TryCatch.js.map
