* @SingleJsoImpl interface C extends A, B {}
*
* Methods inherited from interfaces A and B must be dispatched to
* their respective JSO implementations.
*/
JClassType implementingType = typeOracle.getSingleJsoImpl(intfMethod.getEnclosingType());
if (implementingType == null) {
/*
* This means that there is no concrete implementation of the
* interface by a JSO. Any implementation that might be created by a
* Generator won't be a JSO subtype, so we'll just ignore it as an
* actionable type. Were Generators ever able to create new JSO
* subtypes, we'd have to speculatively rewrite the callsite.
*/
continue typeLoop;
}
/*
* Record the type as being actionable.
*/
singleJsoImplTypes.add(canonicalizeClassName(getBinaryName(type)));
/*
* The mangled name adds the current interface like
*
* com_foo_Bar_methodName
*/
String mangledName = getBinaryName(type).replace('.', '_') + "_"
+ intfMethod.getName();
mangledNames.add(mangledName);
/*
* Handle virtual overrides by finding the method that we would
* normally invoke and using its declaring class as the dispatch
* target.
*/
JMethod implementingMethod;
while ((implementingMethod = findOverloadUsingErasure(
implementingType, intfMethod)) == null) {
implementingType = implementingType.getSuperclass();
}
// implementingmethod and implementingType cannot be null here
/*
* Create a pseudo-method declaration for the interface method. This