Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7902

Re: Annotations processing + type introspection + code generation

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: Annotations processing + type introspection + code generation
Date Mon, 12 Sep 2011 10:04:44 -0700
Organization A noiseless patient Spider
Lines 22
Message-ID <j4le3e$f7m$1@dont-email.me> (permalink)
References <b4cda2f5-442e-42f3-af75-5040215ba997@k15g2000yqd.googlegroups.com> <9d6rupF6dkU1@mid.individual.net>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Mon, 12 Sep 2011 17:04:46 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="15606"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18c4uFBgmqZ05VrzjQDxBAEpyeij6DvVuA="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2
In-Reply-To <9d6rupF6dkU1@mid.individual.net>
Cancel-Lock sha1:Vbbj02sEHvZAiG63pDnaZkPrkG8=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7902

Show key headers only | View raw


On 9/12/2011 9:56 AM, Robert Klemme wrote:

> The only reason I can think of which would require to generate code
> would be ultra high speed requirements.


I think generated code is somewhat more common that you assume.  Since 
the JVM byte codes and class format is public and relatively stable, 
it's quite easy to generate code in a manner that's compatible with 
many, or all, JVMs.

There's also things you can't do at runtime.  For example, the Proxy 
class requires an interface to extend.  But many POJO objects don't 
declare a separate interface.  And requiring the programmer to declare 
an interface for all POJO types within a framework is pretty odious, and 
old school.

I'm playing around with JSF and JPA right now.  I notice that all my 
Entity classes are decorated by extending them with generated code.  I'm 
sure if there were a better way to do it, they would.  But the generated 
code seems to be the way to go in this instance.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Annotations processing + type introspection + code generation Alex J <vstrength@gmail.com> - 2011-09-12 06:21 -0700
  Re: Annotations processing + type introspection + code generation Robert Klemme <shortcutter@googlemail.com> - 2011-09-12 18:56 +0200
    Re: Annotations processing + type introspection + code generation markspace <-@.> - 2011-09-12 10:04 -0700
      Re: Annotations processing + type introspection + code generation Robert Klemme <shortcutter@googlemail.com> - 2011-09-12 19:22 +0200
        Re: Annotations processing + type introspection + code generation Alex J <vstrength@gmail.com> - 2011-09-12 11:08 -0700
    Re: Annotations processing + type introspection + code generation Alex J <vstrength@gmail.com> - 2011-09-12 11:00 -0700
      Re: Annotations processing + type introspection + code generation Robert Klemme <shortcutter@googlemail.com> - 2011-09-12 20:21 +0200
        Re: Annotations processing + type introspection + code generation Alex J <vstrength@gmail.com> - 2011-09-12 15:06 -0700

csiph-web