builder.addDependency(existingBuilder.getJAXBObjectClass());
// Add a static import for the write method on the existing builder class
String methodName = "write" + bean.getType().getSimpleName();
if (builder != existingBuilder) {
JStaticImports staticImports = JStaticImports.getStaticImports(builder.getJAXBObjectClass());
staticImports.addStaticImport(existingBuilder.getJAXBObjectClass().fullName() + "." + methodName);
}
// Call the static method
JInvocation invocation = JExpr.invoke(methodName).arg(builder.getXSW()).arg(propertyVar).arg(builder.getWriteContextVar());
block.add(invocation);