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

7
LINES

< > BotCompany Repo | #1030755 // singleArgumentMethodTypesSubclassing

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

Libraryless. Click here for Pure Java version (2908L/17K).

static <A> Cl<Class<? extends A>> singleArgumentMethodTypesSubclassing(O object, S methodName, Class<A> type) {
  L<Method> methods = singleArgumentMethods(findMethodsNamed_nonSynthetic(object, methodName));
  ret mapNonNulls(methods, m -> {
    Class c = firstMethodArgumentType(m);
    ret isSubclassOf(c, type) ? c : null;
  });
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030755
Snippet name: singleArgumentMethodTypesSubclassing
Eternal ID of this version: #1030755/1
Text MD5: e19b57d919a6add9fcd71ccde853b2e6
Transpilation MD5: 04f9ea7dd4cf85b2fae6346a6d76dfb5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-19 12:22:42
Source code size: 339 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 106 / 164
Referenced in: [show references]