goog.module('cast.Casts$impl');

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

let Foo = goog.forwardDeclare('cast.Casts.Foo$impl');
let Serializable = goog.forwardDeclare('java.io.Serializable$impl');
let Boolean = goog.forwardDeclare('java.lang.Boolean$impl');
let Byte = goog.forwardDeclare('java.lang.Byte$impl');
let Character = goog.forwardDeclare('java.lang.Character$impl');
let Double = goog.forwardDeclare('java.lang.Double$impl');
let Float = goog.forwardDeclare('java.lang.Float$impl');
let Integer = goog.forwardDeclare('java.lang.Integer$impl');
let Long = goog.forwardDeclare('java.lang.Long$impl');
let Number = goog.forwardDeclare('java.lang.Number$impl');
let Short = goog.forwardDeclare('java.lang.Short$impl');
let j_l_String = goog.forwardDeclare('java.lang.String$impl');
let $Casts = goog.forwardDeclare('vmbootstrap.Casts$impl');

class Casts extends j_l_Object {
 /** @protected @nodts */
 constructor() {
  super();
 }
 /** @nodts @return {!Casts} */
 static $create__() {
  Casts.$clinit();
  let $instance = new Casts();
  $instance.$ctor__cast_Casts__void();
  return $instance;
 }
 /** @nodts */
 $ctor__cast_Casts__void() {
  this.$ctor__java_lang_Object__void();
 }
 /** @nodts */
 m_testCastToClass__void() {
  let o = j_l_Object.$create__();
  let c = /**@type {Casts}*/ ($Casts.$to(o, Casts));
 }
 /** @nodts */
 m_testCasToInterface__void() {
  let o = j_l_Object.$create__();
  let s = /**@type {(Serializable|Array)}*/ ($Casts.$to(o, /**@type {Function}*/ (Serializable)));
 }
 /** @nodts */
 m_testCastToBoxedType__void() {
  let o = Integer.$create__int(1);
  let b = /**@type {Byte}*/ ($Casts.$to(o, Byte));
  let d = /**@type {?number}*/ ($Casts.$to(o, Double));
  let f = /**@type {Float}*/ ($Casts.$to(o, Float));
  let i = /**@type {Integer}*/ ($Casts.$to(o, Integer));
  let l = /**@type {Long}*/ ($Casts.$to(o, Long));
  let s = /**@type {Short}*/ ($Casts.$to(o, Short));
  let n = /**@type {(Number|number)}*/ ($Casts.$to(o, Number));
  let c = /**@type {Character}*/ ($Casts.$to(o, Character));
  let bool = /**@type {?boolean}*/ ($Casts.$to(o, Boolean));
 }
 /** @nodts */
 m_testCastToArray__void() {
  let foo = /**@type {Array<*>}*/ (null);
  let bar = /**@type {Array<Array<*>>}*/ (null);
 }
 /** @nodts */
 m_functionForInstanceofTest__void_$p_cast_Casts() {}
 /** @nodts */
 m_testCastVariableAfterInstanceOf__void() {
  let o = j_l_Object.$create__();
  if (Casts.$isInstance(o)) {
   let c = /**@type {Casts}*/ (o);
  }
  if (Casts.$isInstance(o)) {
   let cAvoidsCastsTo = /**@type {Casts}*/ (o);
   o = j_l_Object.$create__();
   let cNotAvoidCastsTo = /**@type {Casts}*/ ($Casts.$to(o, Casts));
  }
  if (Casts.$isInstance(o)) {
   let cAvoidsCastsTo_1 = /**@type {Casts}*/ (o);
   o = Foo.$create__cast_Casts(this);
   let cNotAvoidCastsTo_1 = /**@type {Casts}*/ ($Casts.$to(o, Casts));
  }
  if (Casts.$isInstance(o)) {
   let cAvoidsCastsTo_2 = /**@type {Casts}*/ (o);
   o = j_l_Object.$create__();
   let cAvoidCastsTo = /**@type {Casts}*/ ($Casts.$to(o, Casts));
  }
  if (Casts.$isInstance(o)) {
   let cAvoidsCastsTo_3 = /**@type {Casts}*/ (o);
   this.m_functionForInstanceofTest__void_$p_cast_Casts();
   let cNotAvoidCastsTo_2 = /**@type {Casts}*/ ($Casts.$to(o, Casts));
  }
  let c_1 = Casts.$isInstance(o) ? /**@type {Casts}*/ (o) : null;
 }
 /** @nodts */
 m_testCastFieldAfterInstanceOf__void() {
  let foo = Foo.$create__cast_Casts(this);
  if (Casts.$isInstance(foo.f_field__cast_Casts_Foo)) {
   let c = /**@type {Casts}*/ (foo.f_field__cast_Casts_Foo);
  }
  if (Casts.$isInstance(foo.f_field__cast_Casts_Foo)) {
   let cAvoidsCastsTo = /**@type {Casts}*/ (foo.f_field__cast_Casts_Foo);
   foo.f_field__cast_Casts_Foo = j_l_Object.$create__();
   let cNotAvoidCastsTo = /**@type {Casts}*/ ($Casts.$to(foo.f_field__cast_Casts_Foo, Casts));
  }
  if (Casts.$isInstance(foo.f_field__cast_Casts_Foo)) {
   let cAvoidsCastsTo_1 = /**@type {Casts}*/ (foo.f_field__cast_Casts_Foo);
   foo = Foo.$create__cast_Casts(this);
   let cNotAvoidCastsTo_1 = /**@type {Casts}*/ ($Casts.$to(foo.f_field__cast_Casts_Foo, Casts));
  }
  if (Casts.$isInstance(foo.f_field__cast_Casts_Foo)) {
   let cAvoidsCastsTo_2 = /**@type {Casts}*/ (foo.f_field__cast_Casts_Foo);
   this.m_functionForInstanceofTest__void_$p_cast_Casts();
   let cNotAvoidCastsTo_2 = /**@type {Casts}*/ ($Casts.$to(foo.f_field__cast_Casts_Foo, Casts));
  }
  let c_1 = Casts.$isInstance(foo.f_field__cast_Casts_Foo) ? /**@type {Casts}*/ (foo.f_field__cast_Casts_Foo) : null;
 }
 /** @nodts */
 m_testCaseMethodAfterInstanceOf__void() {
  let foo = Foo.$create__cast_Casts(this);
  if (Casts.$isInstance(foo.m_method__java_lang_Object())) {
   let cNotAvoidCastsTo = /**@type {Casts}*/ ($Casts.$to(foo.m_method__java_lang_Object(), Casts));
  }
  let c = Casts.$isInstance(foo.m_method__java_lang_Object()) ? /**@type {Casts}*/ ($Casts.$to(foo.m_method__java_lang_Object(), Casts)) : null;
 }
 /** @nodts */
 m_testPrecedence__void() {
  let foo = 'foo';
  let bar = 'bar';
  let notString = Integer.m_valueOf__int__java_lang_Integer(123);
  let s1 = /**@type {?string}*/ ($Casts.$to(false ? foo : bar, j_l_String));
  let s2 = /**@type {string}*/ ('foo' + j_l_String.m_valueOf__java_lang_Object__java_lang_String(notString));
 }
 /** @nodts */
 static $clinit() {
  Casts.$clinit = () =>{};
  Casts.$loadModules();
  j_l_Object.$clinit();
 }
 /** @nodts @return {boolean} */
 static $isInstance(/** ? */ instance) {
  return instance instanceof Casts;
 }
 
 /** @nodts */
 static $loadModules() {
  Foo = goog.module.get('cast.Casts.Foo$impl');
  Serializable = goog.module.get('java.io.Serializable$impl');
  Boolean = goog.module.get('java.lang.Boolean$impl');
  Byte = goog.module.get('java.lang.Byte$impl');
  Character = goog.module.get('java.lang.Character$impl');
  Double = goog.module.get('java.lang.Double$impl');
  Float = goog.module.get('java.lang.Float$impl');
  Integer = goog.module.get('java.lang.Integer$impl');
  Long = goog.module.get('java.lang.Long$impl');
  Number = goog.module.get('java.lang.Number$impl');
  Short = goog.module.get('java.lang.Short$impl');
  j_l_String = goog.module.get('java.lang.String$impl');
  $Casts = goog.module.get('vmbootstrap.Casts$impl');
 }
}
$Util.$setClassMetadata(Casts, 'cast.Casts');

exports = Casts;

//# sourceMappingURL=Casts.js.map
