Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1006561 // getField - get a Field from object/class (null if not found). also, get field value

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2950L/17K).

static Field getField(O o, S field) {
  if (o == null) null;
  ret setOpt_findField(_getClass(o), field);
}

sO getField(Field field, O o) {
  ret fieldGet(field, o);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wnsclhtenguj

No comments. add comment

Snippet ID: #1006561
Snippet name: getField - get a Field from object/class (null if not found). also, get field value
Eternal ID of this version: #1006561/4
Text MD5: b5965d78d1f34b00f75f994ead2665fc
Transpilation MD5: 6d1b2e517de3e734a99eb066070e40b1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-05 16:32:17
Source code size: 175 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 606 / 695
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1036539 - findFieldInInterfaces - get a Field from implemented interfaces