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

17
LINES

< > BotCompany Repo | #1034754 // canNewPreciseCall

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

Libraryless. Click here for Pure Java version (5411L/30K).

sbool canNewPreciseCall(O o, S method, O... args) ctex {
  if (o == null) true;
  bool staticCall = o instanceof Class;
  Class c = staticCall ? (Class) o : o.getClass();
  O target = staticCall ? null : o;
  
  _MethodCache cache = callOpt_getCache(c);
  L<Method> methods = cache.cache.get(method);
  if (methods != null) for (Method m : methods) {
    if (staticCall && !isStaticMethod(m)) continue;
    
    int score = methodApplicabilityScore_withPrimitiveWidening(m, args);
    if (score < Int.MAX_VALUE) true;
  }
  
  ret canCallWithVarargs(o, method, args);
}

Author comment

Began life as a copy of #1034745

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034754
Snippet name: canNewPreciseCall
Eternal ID of this version: #1034754/4
Text MD5: 6e06012ec2ff3496399602fc133b8942
Transpilation MD5: 1ab7c850c5750ce891903c1b08fa1905
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-08 03:24:21
Source code size: 587 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 57 / 97
Version history: 3 change(s)
Referenced in: [show references]