• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Property type

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does Java support the attribute type Property? Not sure I'm asking the question properly. I'm looking for the class that masquerades as an attribute, providing implicit getter and setter operations.

If so, can you provide a reference to its syntax?

Thanks
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure I understand. Something like javax.management.Attribute?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean like properties in C#? No, Java does not have something like that. It is, however, a new feature that some people are thinking about to add in the next version of Java, version 7. You'll have to be patient for about two years until we get there... (Java SE 6 was released just this week).

This week I was at JavaPolis, the biggest Java conference in Europe, and Mark Reinhold, one of the architects of Java SE at Sun, held a talk on the future of Java SE. This was one of the possible features he mentioned for a future version of Java.

He mentioned a new keyword, "property":

This would automatically generate a getter and setter method behind the scenes for you.

But the idea is not thought out very well yet and there isn't a JSR for this yet AFAIK.
[ December 14, 2006: Message edited by: Jesper Young ]
 
James Shaw
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jesper;
Thanks. Yes, the C# feature is what I'm looking for in Java.
Thanks.
Jim
[ December 14, 2006: Message edited by: James Shaw ]
 
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic