Hi Leonardo,

Leonardo Uribe schrieb:
> >So to work around the "cannot use reflection on package-scoped class"
> >problem we discussed earlier, you are proposing to make the hand-written
> >class package-scoped, and generate a public concrete class?
>
> Yes. In many cases all properties are defined on the generated class, so
> for this cases we can put package-scope to the hand written class.
>
>
> >That does solve the problem in many cases. But it means that the
> >hand-written class can never itself define any method in the public API.
> >Any code that it implements itself will be overridden by the generated
> >class.
>
> The solution is create abstract methods to get or set  the values. The
> test does not show
> problems using this approach (using reflection to set or get values).
> I'm not tested this
> fully with tomahawk and myfaces, so I will test it and see what
> happens (I don't believe
> that we have problems, since testing this does not show errors)
What does "create abstract methods" mean?

>
> The fact is that if we put the generated class on top we should make
> this class public.
> So if we continue this approach we have to put all generated classes
> public.
>
> Putting the hand written class on top allow us to set this class
> package scope, and let
> the few cases with problems public.
>
>
> > That does solve the problem in many cases. But it means that the
> > hand-written class can never itself define any method in the public API.
> > Any code that it implements itself will be overridden by the generated
> > class.
>
> No if we use component-class-excluded and use an xml to reference the
> property. That's what
> I'm doing now.

Can you please explain this further? I don't understand what you mean..

And can you please comment on this issue raised in the earlier email?

>>However the hand-written code can never reference any of the generated
methods, except by
>> (ecch) downcasting the "this" pointer! And code on the parent for
method foo() cannot fall
>> back to the default implementation via super.foo(). Aren't these
issues a problem?



Regards,
Simon


Reply via email to