// reconcile the superinterfaces
List<Type> newSuperInterfaces = getNewSuperInterfaces(typeDeclaration
.superInterfaceTypes(), newJavaFileVisitor);
for (Type newSuperInterface : newSuperInterfaces) {
if (newSuperInterface.isSimpleType()) {
SimpleType st = (SimpleType) newSuperInterface;
Name name = ast.newName(st.getName().getFullyQualifiedName());
SimpleType newSt = ast.newSimpleType(name);
typeDeclaration.superInterfaceTypes().add(newSt);
} else {
// this shouldn't happen - MyBatis Generator only generates simple names
throw new ShellException("The Java file merger only supports simple types as super interfaces");
}
}
// set the superclass
if (newJavaFileVisitor.getSuperclass() != null) {
if (newJavaFileVisitor.getSuperclass().isSimpleType()) {
SimpleType st = (SimpleType) newJavaFileVisitor.getSuperclass();
Name name = ast.newName(st.getName().getFullyQualifiedName());
SimpleType newSt = ast.newSimpleType(name);
typeDeclaration.setSuperclassType(newSt);
} else {
// this shouldn't happen - MyBatis Generator only generates simple names
throw new ShellException("The Java file merger only supports simple types as super classes");
}