*/
private static void updateInterfacesOfAsync(IJavaProject javaProject,
CompilationUnit serviceUnit,
TypeDeclaration serviceType) throws Exception {
String serviceName = AstNodeUtils.getFullyQualifiedName(serviceType, false);
AST ast = serviceType.getAST();
for (Iterator<?> I = serviceType.superInterfaceTypes().iterator(); I.hasNext();) {
Type type = (Type) I.next();
ITypeBinding typeBinding = AstNodeUtils.getTypeBinding(type);
if (AstNodeUtils.isSuccessorOf(typeBinding, Constants.CLASS_REMOTE_SERVICE)) {
String superServiceName = AstNodeUtils.getFullyQualifiedName(typeBinding, false);
String superAsyncName = superServiceName + "Async";
if (javaProject.findType(superAsyncName) != null) {
if (type instanceof SimpleType) {
{
SimpleType simpleType = (SimpleType) type;
String superAsyncNameSimple = CodeUtils.getShortClass(superAsyncName);
simpleType.setName(ast.newSimpleName(superAsyncNameSimple));
}
if (!CodeUtils.isSamePackage(serviceName, superAsyncName)) {
addImport(serviceUnit, superAsyncName);
}
continue;