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

6
LINES

< > BotCompany Repo | #1023101 // unstructAndCast

JavaX fragment (include)

static <A> A unstructAndCast(Class<A> c, S struct) {
  O o = unstruct(struct);
  if (o == null || isInstance(c, o))
    ret (A) o;
  throw badCastException(o, c);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023101
Snippet name: unstructAndCast
Eternal ID of this version: #1023101/2
Text MD5: 89213bb63627c9dcf8097501f0446633
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-05 18:20:10
Source code size: 169 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 193 / 230
Version history: 1 change(s)
Referenced in: [show references]