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

4
LINES

< > BotCompany Repo | #1006562 // fieldType - get type of an object's/class's field

JavaX fragment (include)

static Class fieldType(O o, S field) {
  Field f = getField(o, field);
  ret f == null ? null : f.getType();
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006562
Snippet name: fieldType - get type of an object's/class's field
Eternal ID of this version: #1006562/1
Text MD5: 10a446df33e45aabb42d3581b80b0326
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-01-17 14:45:40
Source code size: 113 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 637 / 667
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1007115 - getFieldType - synonym of fieldType - get type of an object's/class's field
#1016664 - fieldTypeCompatibleWith - can the field be assigned a value of type X?
#1029586 - genericFieldType - get generic type of an object's/class's field (type including type parameters)