1 | sO safeUnstructureAllowingCertainClasses_plusUtils(S s, S... allowedClasses) { |
2 | new Set<S> allowedClassesSet; |
3 | fOr (S name : allowedClasses) { |
4 | allowedClassesSet.add("main$" + name); |
5 | allowedClassesSet.add("loadableUtils.utils$" + name); |
6 | } |
7 | O classFinder = func(S name) { |
8 | if (!allowedClassesSet.contains(name)) fail("Class not allowed to unstructure: " + name); |
9 | ret classForName(name); |
10 | }; |
11 | ret unstructure(s, false, classFinder); |
12 | } |
Began life as a copy of #1020506
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024663 |
Snippet name: | safeUnstructureAllowingCertainClasses_plusUtils - safe-unstructure, but allowing a few main$ and loadableUtils.utils$ classes |
Eternal ID of this version: | #1024663/6 |
Text MD5: | f4583fcc5aab4572bc1422989402672d |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-25 14:56:22 |
Source code size: | 464 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 231 / 271 |
Version history: | 5 change(s) |
Referenced in: | [show references] |