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

16
LINES

< > BotCompany Repo | #1034183 // test_callForbiddenMethodByReflection

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

Transpiled version (5468L) is out of date.

svoid test_callForbiddenMethodByReflection() {
  var img = newImage(1, 1);
  print(className(img));
  O g = call(img, "getGraphics");
  assertNotNull(g);
  print(className(g));
  java.lang.Module module1 = g.getClass().getModule();
  java.lang.Module module2 = mc().getModule();
  print(+module1);
  print(+module2);
  S packageName = g.getClass().getPackageName();
  print(+packageName);
  bool isExported = module1.isExported(packageName, module2);
  print(+isExported);
  call(g, "fillRect", 0, 0, 1, 1);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034183
Snippet name: test_callForbiddenMethodByReflection
Eternal ID of this version: #1034183/5
Text MD5: e86b9f7af6ef3039c4f3e61155403b1e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-05 13:19:51
Source code size: 524 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 147 / 259
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1034184 - test_callForbiddenMethodByReflection