This discussion is archived
4 Replies Latest reply: Jul 28, 2009 2:50 PM by 843793 RSS

Programm to visualize Collections using annotations...

843793 Newbie
Currently Being Moderated
Hi there!

So far, I have no experience in classloading, annotations and annotation processing... as a little exercise, I thougt of a little app that does the following:

It dynamically loads classes (Collections, specifically) which

a) implement the Iterator interface
b) "have" annotations to mark the methods for insertion, removal (@insert, @remove or whatever)

I use these annotations to map the methods to specific buttons... after insertion/removal, I request the Iterator and paint the changed collection (as a Tree, List, etc.).

So the main function for the app is to test and play a little around with self-implemented collections.

Any suggestions? Ideas? Criticism?

Thanks, Oliver
  • 1. Re: Programm to visualize Collections using annotations...
    jtahlborn Expert
    Currently Being Moderated
    Trollhorn wrote:
    Hi there!

    So far, I have no experience in classloading, annotations and annotation processing... as a little exercise, I thougt of a little app that does the following:

    It dynamically loads classes (Collections, specifically) which

    a) implement the Iterator interface
    I assume you mean the Iterable interface.
    b) "have" annotations to mark the methods for insertion, removal (@insert, @remove or whatever)
    Well, seeing as all the non-Map collections implement Collection, you don't really need any fancy processing, but i guess it could be fun...
  • 2. Re: Programm to visualize Collections using annotations...
    843793 Newbie
    Currently Being Moderated
    Of course, it's the Iterable interface I meant... well, it's actually not meant for the Java Collections Framework but for the data structures students implement for practice in Data Structure courses, so that they don't have to write ugly console apps to test or play around with their programs :-).
  • 3. Re: Programm to visualize Collections using annotations...
    jtahlborn Expert
    Currently Being Moderated
    Trollhorn wrote:
    well, it's actually not meant for the Java Collections Framework but for the data structures students implement for practice in Data Structure courses, so that they don't have to write ugly console apps to test or play around with their programs :-).
    wouldn't it still make sense for them to write collection implementations which implement Collection? it's not too difficult seeing as they can just extend AbstractCollection and would only need to implement the methods you have mentioned anyway.
  • 4. Re: Programm to visualize Collections using annotations...
    843793 Newbie
    Currently Being Moderated
    The idea was that the programm should also work for existing classes, so that you don't have to change the method signatures... but I like your idea... so maybe I should grant both options :-)