J_Class.c
J_Error_t jGetField(J_Class* jc,J_ClassFields** field,J_UtfString name,J_UtfString desc){
  J_UtfString fname, fdesc;
  uint16_t i;

  for(i=0;i<jc->fieldsCount;i++){
	*field = &(jc->fields[i]);
	fname = jGetUtfString(jc,(*field)->nameIdx );
	fdesc = jGetUtfString(jc,(*field)->descrIdx );
	if(name.len==fname.len && desc.len==fdesc.len &&
	   !strncmp(name.str,fname.str,name.len) &&
	   !strncmp(desc.str,fdesc.str,desc.len))
	  return EOK;
  }
  return EFIELDNOTFOUND;
}
/**
 * Try to get class field by name and description
 */
Try to get class field by name and description
Try to get class field by name and description
J_Error_t jGetField(J_Class* jc,J_ClassFields** field,J_UtfString name,J_UtfString desc){
  J_UtfString fname, fdesc;
  uint16_t i;
  for(i=0;i<jc->fieldsCount;i++){
	*field = &(jc->fields[i]);
	fname = jGetUtfString(jc,(*field)->nameIdx );
	fdesc = jGetUtfString(jc,(*field)->descrIdx );
	if(name.len==fname.len && desc.len==fdesc.len &&
	   !strncmp(name.str,fname.str,name.len) &&
	   !strncmp(desc.str,fdesc.str,desc.len))
	  return EOK;
  }
  return EFIELDNOTFOUND;
}
J_Error_t jGetField ( J_Class * jc , J_ClassFields * * field , J_UtfString name , J_UtfString desc ) { J_UtfString fname , fdesc ; uint16_t i ; for ( i = 0 ; i < jc -> fieldsCount ; i ++ ) { * field = & ( jc -> fields [ i ] ) ; fname = jGetUtfString ( jc , ( * field ) -> nameIdx ) ; fdesc = jGetUtfString ( jc , ( * field ) -> descrIdx ) ; if ( name . len == fname . len && desc . len == fdesc . len && ! strncmp ( name . str , fname . str , name . len ) && ! strncmp ( desc . str , fdesc . str , desc . len ) ) return EOK ; } return EFIELDNOTFOUND ; }
Try to get class field by name and description
Try to get class field by name and description