Libraryless. Click here for Pure Java version (5105L/28K).
1 | sO handleObjectMethodsInProxyInvocationHandler( |
2 | O invocationHandler, |
3 | Method implementedMethod, |
4 | Method method, |
5 | O proxy, |
6 | O[] actualArgs) { |
7 | S name = method.getName(); |
8 | |
9 | if (name.equals("hashCode")) |
10 | ret invocationHandler.hashCode(); |
11 | if (name.equals("equals")) |
12 | ret proxy == actualArgs[0]; |
13 | if (name.equals("toString")) |
14 | ret invocationHandler.toString(); |
15 | |
16 | fail("No handler for method " + method + " (only have " + implementedMethod + ")"); |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034937 |
Snippet name: | handleObjectMethodsInProxyInvocationHandler |
Eternal ID of this version: | #1034937/2 |
Text MD5: | 3ca24a9db69a958b36d337a3b134ce3c |
Transpilation MD5: | 5835f100e88c504a289e7952e01e4847 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-16 18:34:26 |
Source code size: | 486 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 149 / 208 |
Version history: | 1 change(s) |
Referenced in: | [show references] |