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

15
LINES

< > BotCompany Repo | #1013046 // Test findField2 (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (1432L/9K).

!7

sclass Bla {
  S bla;
  static S blubb;
}

p {
  assertEquals("bla", findField2(new Bla, "bla").getName());
  assertEquals("blubb", findField2(Bla, "blubb").getName());
  assertNull("non-static in static", findField2(Bla, "bla"));
  //assertNull("static in instance", findField2(new Bla, "blubb"));
  assertEquals("blubb", findField2(new Bla, "blubb").getName());
  print("OK");
}

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: #1013046
Snippet name: Test findField2 (OK)
Eternal ID of this version: #1013046/6
Text MD5: 9bd22195450c2e46822582333ef06a8f
Transpilation MD5: 4584c447617131d668dfe22888f9979a
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-22 16:03:41
Source code size: 398 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 342 / 782
Version history: 5 change(s)
Referenced in: [show references]