|
Foo and CustomerFoo are both isolated with
separate namespaces. In fact XMLBeans generates these classes in separate packages.
Heres what I want to do 1. The Class Foo lives in a package and has
a method that returns a type Bar. The class Bar also lives in the same package
as Foo. 2. The Class CustomerFoo extends Foo and overrides the method that returns the type
Bar to return the type CustomerBar. The CustomerBar extends Bar to include new
variables. Both these classes live in a separate package. The schemas are designed and namespaced to
achieve this. XMLBeans generates that right classes based on the hierarchy and in
the right packages. Here is the issue I want this common OO concept enforced. In FOO I have a method: com.pearson.sorm.test.Bar getBar(); In CustomerFoo I want to have: com.pearson.sorm.test.Bar getBar() that overrides the method in Foo but
returns CustomerBar...(CustomerBar extends Bar) Remember that the schemas are namespaced
to achieve this and the java namespace(packages that are generated) allows
this. What I see is that instead of getBar()....XMLBeans decides that there
is a namespace conflict and generates the method getBar2() that essentially
prevents overriding. --Sam From: ****************************************************************************
This
email may contain confidential ***************************************************************************
**************************************************************************** This email may contain confidential *************************************************************************** |

