Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 876607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:27:39+00:00 2026-05-15T11:27:39+00:00

For a project at university I plan to build an annotation based tool to

  • 0

For a project at university I plan to build an annotation based tool to visualize/play around with data structures.

Here’s my idea:

Students which want to try out their self-written data structures need to:

  • mark the type of their data structures using some sort of marker annotation e.g.

    @List
    public class MyList<E> { ... }
    

    so that I know how to represent the data structure

  • need to provide an iterator so that I can retrieve the elements in the right order

  • need to annotate methods for insertion and removal, e.g.

    @add public boolean insert(E e) { ... }
    

    so that I can “bind” that method to some button.

Do similar applications exist? I googled a little bit around but didn’t find anything like that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:27:40+00:00Added an answer on May 15, 2026 at 11:27 am

    I do not really understand why do you need to use Annotations for such a task? You will end up with some weird methods that your framework would not be able to parse, or will parse it the wrong way – bringing you to making up a set of rules how to properly write that methods so your framework could understand them.

    I think it is much better solution to use interfaces instead. Create your own interface called StudentList or something, with methods like getIterator, getIndex, etc. and make students implement this interface. Then you will be able to load any of that classes and use it based on the interface they implement.

    Also, you could just reuse avialable interfaces like List or Collection, however, this could make students write a lot of unused code to implement that interfaces. So I would rather go with writing my own interface.

    Example of such interface would be:

    interface StudentList<T> {
        public Iterator<T> getIterator();
        public T get(int index);
        public void add(T element);
        public void remove(T element);
    }
    

    Students would implement it like this (this example just wraps around ArrayList):

    class MyList<T> implements StudentList<T> {
        private ArrayList<T> realList;
    
        public MyList() {
            realList = new ArrayList<T>();
        }
    
        public void add(T element) {
            realList.add(element);
        }
    
        .......
    }
    

    And you would test it like this:

    void testList(StudentList<String> list) {
       list.add(5);
       list.add(10);
       list.get(20);
    }
    
    testList(new MyList<String>());
    

    Everything is clear both for students and for you this way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a university project I programmed a Internet Explorer Browser Helper Object to process
While I was working on an University project, I used a project-internal profiler made
I am creating a php/mysql application for a university project and I am looking
I and two others are working on a project at the university. In the
For a university mid-term project I have to design a configurable processor, to write
I'm doing a project in a course at my university on distributed systems. I'm
My project is based on spring framework 2.5.4. And I try to add aspects
Project Darkstar was the topic of the monthly JavaSIG meeting down at the Google
Every project invariably needs some type of reporting functionality. From a foreach loop in
A project I'm working on at the moment involves refactoring a C# Com Object

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.