MethodInformation methodInfo = new RuntimeMethodInformation(method);
MethodInformation delegatingMethodInfo = new StaticMethodInformation(method.getName() + SUPER_DELEGATE_SUFFIX,
method.getParameterTypes(), method.getReturnType(), proxyClassType.getName(), Modifier.PRIVATE
| (method.getModifiers() & AccessFlag.BRIDGE));
ClassMethod delegatingMethod = proxyClassType.addMethod(method.getModifiers() | AccessFlag.SYNTHETIC, method.getName()
+ SUPER_DELEGATE_SUFFIX, DescriptorUtils.classToStringRepresentation(method.getReturnType()),
DescriptorUtils.getParameterTypes(method.getParameterTypes()));
delegatingMethod.addCheckedExceptions((Class<? extends Exception>[]) method.getExceptionTypes());
createDelegateToSuper(delegatingMethod, delegatingMethodInfo);
ClassMethod classMethod = proxyClassType.addMethod(method);
addConstructedGuardToMethodBody(classMethod);
createForwardingMethodBody(classMethod, methodInfo, staticConstructor);
BeanLogger.LOG.addingMethodToProxy(method);
} catch (DuplicateMemberException e) {
// do nothing. This will happen if superclass methods have
// been overridden
}
} else {
if (Modifier.isFinal(method.getModifiers())) {
finalMethods.add(methodSignature);
}
if (method.isBridge()) {
declaredBridgeMethods.add(methodSignature);
}
}
}
processedBridgeMethods.addAll(declaredBridgeMethods);
cls = cls.getSuperclass();
}
for (Class<?> c : getAdditionalInterfaces()) {
for (Method method : c.getMethods()) {
MethodSignature signature = new MethodSignatureImpl(method);
if (enhancedMethodSignatures.contains(signature) && !processedBridgeMethods.contains(signature)) {
try {
MethodInformation methodInformation = new RuntimeMethodInformation(method);
final ClassMethod classMethod = proxyClassType.addMethod(method);
createSpecialMethodBody(classMethod, methodInformation, staticConstructor);
BeanLogger.LOG.addingMethodToProxy(method);
} catch (DuplicateMemberException e) {
}
}