Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] adding inheritance of a class definition after parsing

david kment

2008-08-21

Replies: Find Java Web Hosting

Author LoginPost Reply
hi folks.

i guess this is a rather unusual request:

currently, i am parsing class "user"-classes from plain script files. works great.
to allow each of these classes to have certain default members and methods,
each of the userclass definitions inherits from a default parent class using "extends"
keyword. the default parent class is written in java, the user classes are in groovy.

now i want to make all user classes to extend the default parent class, but without
the users having to type "extends DefaultParent" all the time (so having "extends DefaultParent"
implicitly).

is there a runtime way of assigning an inheritance (other than modifying the script
source as a string before parsing it)?

thanks,

regards,

David


________________________________________________________________________
Schon gehört? Bei WEB.DE gibt' s viele kostenlose Spiele:
http://games.entertainment.web.de/de/entertainment/games/free/index.html


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.