Locate all types with an Annotation

4 views
Skip to first unread message

Mark Renouf

unread,
Feb 19, 2009, 11:52:41 PM2/19/09
to rocket-gwt
Hello. I have some generator code which locates all types with a
certain annotation attached. To do this, it relies on
TypeOracle.getTypes() and loops through each type. Unfortunately I
haven't found a more efficient way to do this.

I'm interested in using Rocket-GWT for the code generator and template
capability. But unfortunately, there is no way to access the list of
all types directly through rocket-gwt's GeneratorContext. I have
resorted to overloading the constructor of rocket-gwt's Generator and
stashing a reference to the TypeOracle in my class.

Do you think it would be possible to expose this in rocket-gwt?

Miroslav Pokorny

unread,
Feb 20, 2009, 1:49:54 AM2/20/09
to rocke...@googlegroups.com, rocket-gwt
Can you provide a patch ???

Sent from my iPhone - 0412 88 52 35

Mark Renouf

unread,
Feb 27, 2009, 11:34:18 AM2/27/09
to rocket-gwt
Yes, possibly. However it might be difficult to implement this for the
JavaGeneratorContext.

I'll see when I can get around to this.

This is part of a plan to rewrite an XML marshalling library I
developed for GWT (GWT scans annotated classes and generates code
automatically). The code is quite messy so I'd like to rewrite using
Rocket Generator.

I also wanted to recommend splitting the different packages into
separate jars. I'm weary of including the full library because it
contains replacements for several GWT classes. For now I made a custom
jar with just gwt-generator and it's required dependencies
(rocket.compiler, rocket.text and rocket.util).

On Feb 20, 1:49 am, Miroslav Pokorny <miroslav.poko...@gmail.com>
wrote:
> Can you provide a patch ???
>
> Sent from my iPhone - 0412 88 52 35
>

Miroslav Pokorny

unread,
Feb 27, 2009, 9:05:17 PM2/27/09
to rocke...@googlegroups.com, rocket-gwt
I guess it's not always possible or necessary to implement every
single required operation.

The only work required to have the codebase catch up with the new 1.5
compatible gwt is to add support for genetics. This requires some work
- i am unsure when this can be done.


Why is it necssary to bring XML to the clientside ? Would it not be
easier to just send pojos ? I can't see any advantage in bringing XML
over. It's much easier to do your Pojo XML binding on the server. This
also means less code in your gwt app which is an additional plus...
Reply all
Reply to author
Forward
0 new messages