Oliver
Ok I see what you mean--I misunderstood last time. Your approach sounds
fine: generate a subclass with CGLIB that means you can instantiate the
abstract class, and use an introduction to actually provide the behaviour
for those methods. The subclass could simply throw
UnsupportedOperationException for all methods, as the "implementation" of
these methods is purely to allow class instantiation, not for real usage.
Regards,
Rod
----- Original Message -----
From: "Oliver Hutchison" <Oli...@ou...>
To: <spr...@li...>
Sent: Monday, April 05, 2004 11:38 PM
Subject: RE: [Springframework-developer] Automagic creation of concrete
class from interface/abstract classes
Rod,
For interfaces I see how you would do it but how would it be done for
abstract classes?
The only way I can see is to extract an interface which has all the
abstract methods and then introduce it to the original abstract class
but I'd still have to fall back to CGLIB to generate the interface...
Not the most elegant solution but I guess it would work.
Thanks,
Oliver
-----Original Message-----
From: rod...@in... [mailto:rod...@in...]
Sent: Monday, 5 April 2004 6:21 PM
To: spr...@li...
Subject: Re: [Springframework-developer] Automagic creation of concrete
class from interface/abstract classes
Oliver
Introductions in Spring AOP should work fine for this. I
don't there's any need to use CGLIB independently.
Introductions in Spring work with dynamic proxies also.
Regards,
Rod
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|