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

  • SEARCH
  • Home
  • 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 175915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:47:02+00:00 2026-05-11T13:47:02+00:00

The question tells it all. For the experts, is there a reason the SUN

  • 0

The question tells it all.

For the experts, is there a reason the SUN java 5 compiler accepts recursive annotations (contrary to the langspec), while the later compilers do not? I mean, what could be an argument against recursive annotations.

Edit: a recursive annotation is something like:

@Panel(layout=BorderLayout.class,     nested={         @Panel(region=NORTH, layout=FlowLayout.class, ...)         @Panel(region=SOUTH, layout=FlowLayout.class, ...)     } ) 
  • 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. 2026-05-11T13:47:02+00:00Added an answer on May 11, 2026 at 1:47 pm

    First — I’m not sure what you mean by recursive annotations. Do you mean annotations that can contain references to other annotations of the same type? Something like

    @Panel(layout=BorderLayout.class,     nested={         @Panel(region=NORTH, layout=FlowLayout.class, ...)         @Panel(region=SOUTH, layout=FlowLayout.class, ...)     } ) 

    (which would be an example of where I’d like to use it if it were possible…)

    As for my use of custom annotations (and processors): code generation.

    See http://code.google.com/p/javadude/wiki/Annotations

    For example, JavaBean properties:

    @Bean(     properties={           @Property(name='name'),       @Property(name='phone', bound=true),       @Property(name='friend', type=Person.class, kind=PropertyKind.LIST)     } ) public class Person extends PersonGen {     // generated superclass PersonGen will contain getters/setters     //    field definitions, property change support... } 

    or a mix-in example

    package sample;  import java.util.List;  public interface IFlightAgent {     List<IFlight> getFlight();     void reserve(IFlight flight); }  public interface ICarAgent {     List<ICar> getCars();     void reserve(ICar car); }  public interface IHotelAgent {     List<IHotel> getHotels();     void reserve(IHotel hotel); }  package sample;  import com.javadude.annotation.Bean; import com.javadude.annotation.Delegate;  @Bean(delegates = {     @Delegate(type = IHotelAgent.class,               property = 'hotelAgent',               instantiateAs = HotelAgentImpl.class),     @Delegate(type = ICarAgent.class,               property = 'carAgent',               instantiateAs = CarAgentImpl.class),     @Delegate(type = IFlightAgent.class,               property = 'flightAgent',               instantiateAs = FlightAgentImpl.class)     } ) public class TravelAgent extends TravelAgentGen     implements IHotelAgent, ICarAgent, IFlightAgent {     // generated superclass TravelAgentGen will create instances     //   of the 'instantiateAs' classes and delegate the interface     //   methods to them } 

    See The drawbacks of annotation processing in Java? and my answer to it for some potential issues with their usage.

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

Sidebar

Related Questions

The title of the question pretty much tells it all. When using the java
Quick question. I have been Googling this all morning, but it's either not there,
the title already tells the question: you can successfully call the Print-Method on a
Question 1 Can anyone tell me if there is any difference between following 2
Note, my question is not: how do I tell my compiler to compile with
That's basically all my question is, if I have php pages that have 5,000-10,000
The top answer to this question tells me how to stop/start a remote service.
I eliminated all the leaks from my current app. However Instruments constantly tells me
Similar to the question I asked here , if I wanted to list all
There's probably a Google search that'll answer this question but for the life of

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.