The Artima Developer Community
Sponsored Link

Java Buzz Forum
Partial classes and code generation

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Chris Winters

Posts: 931
Nickname: cwinters
Registered: Jul, 2003

Daytime: Java hacker; nighttime: Perl hacker; sleeptime: some of both.
Partial classes and code generation Posted: Nov 17, 2003 1:42 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Chris Winters.
Original Post: Partial classes and code generation
Feed Title: cwinters.com
Feed URL: http://www.cwinters.com/search/registrar.php?domain=jroller.com®istrar=sedopark
Feed Description: Chris Winters on Java, programming and technology, usually in that order.
Latest Java Buzz Posts
Latest Java Buzz Posts by Chris Winters
Latest Posts From cwinters.com

Advertisement
Ted Neward has an intriguing post about "partial" classes in C#. Splitting a class into multiple files is a fantastic idea because it gets around one of the main problems with code generation systems -- how to modify or add to the generated code. My non-optimal solution has been to create an abstract parent of the generated class and implement the custom functionality there, and at gentime the code generator looks for a class conforming to a naming convention and if its found, subclases it. This gets around the necessity of the instantiator of the class needing to know if it's customized, but it's still a bit ugly. I could (and probably will eventually) get around this with a factory, a more decoupled solution. But there you are...

Read: Partial classes and code generation

Topic: Fake J2EE is not that bad! Previous Topic   Next Topic Topic: A Good Combination GSM Phone and PDA

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use