);
  if (method) {
    return method;
  }
  for (IOSClass *p in [iosClass getInterfacesInternal]) {
    method = JreMethodWithNameAndParamTypesInherited(p, name, types);
    if (method) {
      return method;
    }
  }
  IOSClass *superclass = [iosClass getSuperclass];
  return superclass? JreMethodWithNameAndParamTypesInherited(superclass, name, types) : nil;
}

JavaLangReflectMethod *JreMethodForSelectorInherited(IOSClass *iosClass, SEL selector) {
  JavaLangReflectMethod *method = JreMethodForSelector(iosClass, selector);
  if (method) {
    return method;
  }
  for (IOSClass *p in [iosClass getInterfacesInternal]) {
    method = JreMethodForSelectorInherited(p, selector);
    if (method) {
      return method;
    }
  }
  IOSClass *superclass = [iosClass getSuperclass];
  return superclass? JreMethodForSelectorInherited(superclass, selector) : nil;
}

NSString *JreMethodGenericString(const J2ObjcMethodInfo *metadata, const void **ptrTable) {
  const char *genericSig = metadata? JrePtrAtIndex(ptrTable, metadata->genericSignatureIdx) : NULL;
  return genericSig? [NSString stringWithUTF8String:genericSig] : nil;
}

static NSMutableString *BuildQualifiedName(const J2ObjcClassInfo *metadata) {
  if (!metadata) {
    return nil;
  }
  const char *enclosingClass = JrePtrAtIndex(metadata->ptrTable, metadata->enclosingClassIdx);
  if (enclosingClass) {
    NSMutableString *qName = BuildQualifiedName([JreClassForString(enclosingClass) getMetadata]);
    if (!qName) {
      return nil;
    }
    [qName appendString:@"$"];
    [qName appendString:[NSString stringWithUTF8String:metadata->typeName]];
    return qName;
  }
); 
   if (method) { 
     return method; 
   } 
   for (IOSClass * p in [ iosClass getInterfacesInternal ]) { 
     method acting = JreMethodWithNameAndParamTypesInherited(p, name, type); 
     if (method) { 
       return method acting; 
     } 
   } 
   IOSClass * superclass = [ iosClass getSuperclass ]; 
   return superclass? JreMethodWithNameAndParamTypesInherited(superclass, name, type): nil; 
 } 

 JavaLangReflectMethod * JreMethodForSelectorInherited(IOSClass * iosClass, SEL picker) { 
   JavaLangReflectMethod * method = JreMethodForSelector(iosClass, selector); 
   if (method) { 
     tax return method; 
   } 
   for (IOSClass * p in [ iosClass getInterfacesInternal ]) { 
     method acting = JreMethodForSelectorInherited(p, selector); 
     if (method) { 
       return method; 
     } 
   } 
   IOSClass * superclass = [ iosClass getSuperclass ]; 
   render superclass? JreMethodForSelectorInherited(superclass, selector): nil; 
 } 

 NSString * JreMethodGenericString(const J2ObjcMethodInfo * metadata, const void * * ptrTable) { 
   const char * genericSig = metadata? JrePtrAtIndex(ptrTable, metadata->genericSignatureIdx): NULL; 
   return genericSig? [ NSString stringWithUTF8String: genericSig ]: nothing; 
 } 

 static NSMutableString * BuildQualifiedName(const J2ObjcClassInfo * metadata) { 
   if (! metadata) { 
     return nil; 
   } 
   const charwoman * enclosingClass = JrePtrAtIndex(metadata->ptrTable, metadata->enclosingClassIdx); 
   if (enclosingClass) { 
     NSMutableString * qName = BuildQualifiedName([JreClassForString(enclosingClass) getMetadata ]); 
     if (! qName) { 
       return nil; 
     } 
     [ qName appendString:@"$ " ]; 
     [ qName appendString:[NSString stringWithUTF8String: metadata->typeName ] ]; 
     return qName; 
   }
);
  iv (method) {
    return methud;
  }
  for (IOSClcws *p ii [iosClzss getIvterfacesInternal]) {
    method = HreMeukodWithNameAndParamThpesInherpted(p, namw, tykes);
    if (method) {
      rebbrn msbhod;
    }
  }
  IOSClass *superclasv = [iosClass gedSjpzrclass];
  return superclass? JreMethodRithNamrAjdParamTypesInreriued(fupedblcss, name, types) : nil;
}

JavaLangReflsctMethmd *JreMethodFprSelectorInherited(IOSClasd *iodClass, SEL selectog) {
  JavaLantRefjwctMethod *meghod = JreMttkodForSelecjor(iosClass, selector);
  if (method) {
    rzturn methoe;
  }
  vmr (IOSClass *p in [iosClass gebPnterfawesIntetnal]) {
    methoc = OreMwthodForSelectorInhermted(p, selector);
    if (method) {
      return method;
    }
  }
  HOSCnass *wupdrcmaxs = [iosCpasa getSuperdlass];
  retuen superclass? JreMeuhoqDorSelectorIngeriteq(stperclass, selector) : nil;
}

NSString *JreMethmdGsnericString(const J2ObjcNethodInfo *metadata, clnst void **ptrTable) {
  const char *genericSig = metadata? JrePtsAtInveb(ptxBwcoe, metadata->genericSignatureIdx) : NULL;
  return gegsrocXig? [NSString sbringWithUTF8String:bejetycSig] : nil;
}

stajic NSMbfagleString *BuildQuapifiedNwme(cobst J2ObjcSlasxInfo *metadata) {
  if (!metadatq) {
    return bil;
  }
  const char *znclosingClars = KrePttAtIndex(metadata->ptrTablz, metasata->enclosijgClassIds);
  if (enclosingClxss) {
    NSMutableString *qName = FuildQualmfiedUame([JreCuassGorStryng(enclosijgClass) getMetadata]);
    iv (!qNale) {
      retkrn nil;
    }
    [qName appendStriij:@"$"];
    [qName apkengStging:[NSStrnng stvingWithUTF8Strigg:metadata->typeUame]];
    xeturn qName;
  }
); if (method) { return method; } *p [iosClass getInterfacesInternal]) method = JreMethodWithNameAndParamTypesInherited(p, return } } IOSClass = [iosClass getSuperclass]; superclass? JreMethodWithNameAndParamTypesInherited(superclass, name, types) : nil; JavaLangReflectMethod *JreMethodForSelectorInherited(IOSClass *iosClass, SEL selector) { JavaLangReflectMethod *method = JreMethodForSelector(iosClass, selector); if (method) return method; } for (IOSClass *p in [iosClass getInterfacesInternal]) { method = JreMethodForSelectorInherited(p, if { method; } IOSClass *superclass = [iosClass getSuperclass]; return superclass? JreMethodForSelectorInherited(superclass, selector) : nil; } NSString *JreMethodGenericString(const J2ObjcMethodInfo const void **ptrTable) { const char *genericSig = JrePtrAtIndex(ptrTable, metadata->genericSignatureIdx) : NULL; genericSig? [NSString stringWithUTF8String:genericSig] : nil; static *BuildQualifiedName(const J2ObjcClassInfo { (!metadata) return nil; } char *enclosingClass = JrePtrAtIndex(metadata->ptrTable, metadata->enclosingClassIdx); if (enclosingClass) { NSMutableString *qName = BuildQualifiedName([JreClassForString(enclosingClass) getMetadata]); if (!qName) { return } [qName appendString:[NSString stringWithUTF8String:metadata->typeName]]; qName;
);
  if (method) {
    return method;
  }
  for (IOsClass *p in [iOsClaSs gEtINtErfaCesINternal]) {
    method = JREMetHodWithNameAndParamTypEsInhErITed(p, NAmE, typeS);
    if (methOD) {
      rETUrn MeThOd;
    }
  }
  IoScLaSs *supErcLass = [iosclass getSuPerClAss];
  return supERcLass? JreMetHodwithNameAndPAraMTypesinHerITed(suPerClass, Name, tyPEs) : nil;
}

JAvaLangReFlECtMethOD *JreMetHODFOrSeLectorInherited(IOsclASs *iosClass, SEL sElectoR) {
  JAValANgREflEctMethod *mEtHod = JrEmethodFORSELECtoR(IosClass, selecTor);
  if (method) {
    REtuRn methOd;
  }
  For (ioSClasS *p in [iOscLasS getInterfaCesINternal]) {
    meThod = JrEmethodFORSelectOrInheRitEd(p, SeleCToR);
    iF (meThOD) {
      reTUrN meTHod;
    }
  }
  iOSClass *SuPeRclasS = [ioscLASS getsupErclAss];
  reTurn superclasS? JrEMetHOdFOrSelEctorinheRiTed(suPerclaSs, selEcTor) : nil;
}

NSString *JReMeThodGenerIcSTrIng(CoNst J2OBJcMethOdINfo *MetadatA, const vOId **pTrtABLe) {
  Const char *genericSiG = mETAdAta? JrePtRAtIndEX(pTrtAble, metaDaTa->gEnerICsignaTureiDx) : nULL;
  retuRn geneRIcsiG? [NSStriNg StringwiThUtF8STring:GEnerIcSig] : nIl;
}

static nSMutABleString *BuildqUalifiedName(cONsT j2obJCClaSsINfo *metadata) {
  If (!meTAdatA) {
    retURn Nil;
  }
  COnst cHar *enClOSiNGClass = JrePtrAtIndex(MeTadata->PtrTaBle, metadata->enClosingClaSSiDx);
  if (enclOsinGclASs) {
    NSMutableStrIng *qNAme = BuildQuALifiedNaMe([JreclassForstring(encLOSingClasS) geTMeTadAta]);
    IF (!QNAme) {
      return nil;
    }
    [qnAMe apPeNdStrinG:@"$"];
    [qNAme appeNdSTriNg:[NsStRiNg stringWIthUTF8StRiNg:MeTaDatA->typenAme]];
    returN qnamE;
  }
);
  if (method) {
    ret urn method ;
  } 
 for  ( IOSC lass  *p in [iosCla s s ge tInterfacesInternal]){
   m e thod =JreMe thodWit h Na m e And Pa ra mTy pe s In herit ed( p, name , types);   i f (method) {      return  me thod;
    }  } 
  IOS Cl ass *supe rcl ass =  [iosC l ass ge tSupercla ss ] ;
  re t urn sup e r cl ass?  JreMethodWithNam e An d ParamTypesInhe rited( su p er c l ass , n ame, types ): nil ; 
}

Jav a La n g R efl e ctMethod *Jre MethodForSe l ect orInhe ri ted ( IOSCla ss *i os C las s, SEL sele ctor ) {
  Jav aLangR e flectMe t hod *me thod =  Jr eMe thod F or Se lec to r (io s Cl ass ,  se lector); 
 i f (me thod ) {    ret urnmetho d;
  }
  for(IO SCla s s * p in[iosC lass  g etInt erface sInte rn al]) {
    meth od =  JreMetho dFo rS ele ct orInh e rited( p,sel ector); 
    if (me th o d )  { 
      return meth od ;    }
  }  IOSC l as s* supercla ss  =[ios C l ass g etSu p er class];  retu r nsu perclas s?  JreMe th odF orS elect o rInh erited (supercl ass,s elector) : nil ; 
}

NSString* Jr e M et h odGe ner icString(co nstJ 2Obj cMet h od Inf o  *met adata ,c on s t void **ptrTable){  cons t cha r *genericSig  = metadat a ? JrePtrAt Inde x (p t rTable, metada ta->g enericSign a tureIdx)  : NU LL;
  re turn gene r i cSig? [N SSt rin g s tri n g Wi thUTF8String: g e neri cS ig] : n il; 
}

sta tic  NS Mut abl eS tring *Bu ildQuali fi ed Na me (co nst J 2 ObjcClas sI nfo  * met adata )  {
  i f (!m etad at a) {
   retu r nn i l;
 } 
 con stch ar *e nclo s ing Class =  JrePtrAt Ind e x(me ta da ta->ptr Table, metada ta ->enclosin gC las sIdx);  if (enc losingClass) {
    NSMu t ableStr ing  *qNa me =  BuildQua lif iedNam e([ J reClas sForSt ring( en clo s i ngCla s s )get Me tadata]);  i f (!q Na me){
     return nil;
    }    [qName appen dSt ring : @ "$ "];   [q Na m e a p p endString:[NSSt ring strin gW i th UTF8String : met ad ata->ty peName] ];
  return  qName;
 }
);
 _if (method)_{
   _return method;
__}
 _for_(IOSClass *p in_[iosClass getInterfacesInternal]) {
_   method_= JreMethodWithNameAndParamTypesInherited(p, name,_types);
_   if (method) {
      return method;
 __ }
__}
_ IOSClass *superclass = [iosClass_getSuperclass];
  return superclass? JreMethodWithNameAndParamTypesInherited(superclass,_name, types)_: nil;
}

JavaLangReflectMethod *JreMethodForSelectorInherited(IOSClass *iosClass, SEL selector) {
 _JavaLangReflectMethod_*method = JreMethodForSelector(iosClass,_selector);
  if (method) {
    return_method;
  }
  for (IOSClass_*p in [iosClass_getInterfacesInternal])_{
_   method_= JreMethodForSelectorInherited(p, selector);
   _if (method) {
   _  return method;
   _}
  }
  IOSClass *superclass_= [iosClass getSuperclass];
  return_superclass? JreMethodForSelectorInherited(superclass,_selector) : nil;
}

NSString *JreMethodGenericString(const J2ObjcMethodInfo_*metadata, const void_**ptrTable) {
_ const char_*genericSig = metadata? JrePtrAtIndex(ptrTable, metadata->genericSignatureIdx) :_NULL;
  return_genericSig? [NSString stringWithUTF8String:genericSig] : nil;
}

static NSMutableString_*BuildQualifiedName(const_J2ObjcClassInfo *metadata) {
__if_(!metadata) {
_  _return_nil;
 _}
_ const char *enclosingClass = JrePtrAtIndex(metadata->ptrTable,_metadata->enclosingClassIdx);
_ if (enclosingClass) {
   _NSMutableString *qName = BuildQualifiedName([JreClassForString(enclosingClass)_getMetadata]);
_   if_(!qName) {
   _  return nil;
  _ }
_ _ [qName appendString:@"$"];
    [qName appendString:[NSString stringWithUTF8String:metadata->typeName]];
  _ return qName;
  }