J_Class.c
J_Error_t jGetFieldByIndex(J_Class* jc,J_ClassFields** field,uint16_t idx,J_Thread* thContext){
  J_Class* targetClass;
  J_UtfString fname,fdesc;
  uint16_t    classIdx, nameTypeIdx, nIdx, tIdx;

  uint8_t* p = jc->consts[idx] + jc->classmem;
  classIdx = getUint16(p+1);
  if(jGetClassByIndex(jc,&targetClass,classIdx,thContext)!=EOK || targetClass==NULL)
	return EFIELDNOTFOUND;
  
  nameTypeIdx = getUint16(p+3);
  nIdx = getUint16(jc->consts[nameTypeIdx]+jc->classmem+1); 
  tIdx = getUint16(jc->consts[nameTypeIdx]+jc->classmem+3);

  fname = jGetUtfString(jc,nIdx);
  fdesc = jGetUtfString(jc,tIdx);

  return jGetField(targetClass,field,fname,fdesc);
}
/**
 * Try to get class field by index
 */
Try to get class field by index
Try to get class field by index
J_Error_t jGetFieldByIndex(J_Class* jc,J_ClassFields** field,uint16_t idx,J_Thread* thContext){
  J_Class* targetClass;
  J_UtfString fname,fdesc;
  uint16_t    classIdx, nameTypeIdx, nIdx, tIdx;
  uint8_t* p = jc->consts[idx] + jc->classmem;
  classIdx = getUint16(p+1);
  if(jGetClassByIndex(jc,&targetClass,classIdx,thContext)!=EOK || targetClass==NULL)
	return EFIELDNOTFOUND;
  nameTypeIdx = getUint16(p+3);
  nIdx = getUint16(jc->consts[nameTypeIdx]+jc->classmem+1); 
  tIdx = getUint16(jc->consts[nameTypeIdx]+jc->classmem+3);
  fname = jGetUtfString(jc,nIdx);
  fdesc = jGetUtfString(jc,tIdx);
  return jGetField(targetClass,field,fname,fdesc);
}
J_Error_t jGetFieldByIndex ( J_Class * jc , J_ClassFields * * field , uint16_t idx , J_Thread * thContext ) { J_Class * targetClass ; J_UtfString fname , fdesc ; uint16_t classIdx , nameTypeIdx , nIdx , tIdx ; uint8_t * p = jc -> consts [ idx ] + jc -> classmem ; classIdx = getUint16 ( p + 1 ) ; if ( jGetClassByIndex ( jc , & targetClass , classIdx , thContext ) != EOK || targetClass == NULL ) return EFIELDNOTFOUND ; nameTypeIdx = getUint16 ( p + 3 ) ; nIdx = getUint16 ( jc -> consts [ nameTypeIdx ] + jc -> classmem + 1 ) ; tIdx = getUint16 ( jc -> consts [ nameTypeIdx ] + jc -> classmem + 3 ) ; fname = jGetUtfString ( jc , nIdx ) ; fdesc = jGetUtfString ( jc , tIdx ) ; return jGetField ( targetClass , field , fname , fdesc ) ; }
Try to get class field by index
Try to get class field by index