Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes Property type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Property type" Watch "Property type" New topic
Author

Property type

James Shaw
Greenhorn

Joined: Mar 10, 2005
Posts: 3
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


In the valley of the blind, the one-eyed man is king.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

I'm not sure I understand. Something like javax.management.Attribute?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

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 ]

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
James Shaw
Greenhorn

Joined: Mar 10, 2005
Posts: 3
Jesper;
Thanks. Yes, the C# feature is what I'm looking for in Java.
Thanks.
Jim
[ December 14, 2006: Message edited by: James Shaw ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Property type
 
Similar Threads
Using EL with [] and . operator
Problem with Tiles
type conversions
Help configuring a Jboss data Source ?
why my 2D float array not showing values in my jsp