On Wed, 2003-07-09 at 07:45, Andrew Stevens wrote:
> I had another thought as to why hyphens are now a problem - could it be
> related to the metadata JSR?  More specifically, are hyphens valid
> characters in java identifiers?  I never use them myself, but can't
> remember whether the Java Language Spec actually prohibits them (and
> don't have it to hand at the moment); 

Okay, now I do.  According to section 3.8
(http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625) 
identifiers must consist of "Java Letters", i.e. characters for which 
Character.isJavaIdentifierPart returns true.  That's not the case for hyphens, so they 
can't be used in identifiers.

> if so, and the metadata JSR is
> planning to use @tags for attributes, and they're going to force
> metadata attribute @tags to be valid identifiers (same as
> class/package/variable names), then perhaps javadoc is enforcing it now
> so that people get used to it?
> 
> Of course, that's a lot of 'if's, and could be absolutely nothing to do
> with it.  Does anyone know what's going on with the metadata JSR?  Is it
> in public review yet, or is it still only the expert group that know
> what's planned?

Although JSR 175's on the Java 1.5 roadmap
(http://developer.java.sun.com/developer/technicalArticles/RoadMaps/J2SE_1.5/j2se_1_5.html),
 there's no public draft available for it yet.  So it's still only the expert group 
that know anything.  However, there's a couple of hints - the JSR itself 
(http://www.jcp.org/en/jsr/detail?id=175) says

"The exact syntax will need to be determined by the expert group. There
appear to be a number of possibilities, including (but not limited to!)
using a doc comment tag @meta or adding a new Java programming language
keyword meta."

and the New Language Features interview
(http://java.sun.com/features/2003/05/bloch_qa.html) with Joshua Bloch
(the JSR's spec lead) has a sample that reads

"public class CoffeeOrder { 
    @Remote public Coffee [] getPriceList() {
        ...
    }
    @Remote public String orderCoffee(String name, int quantity) {
        ...
    }
}"

If that turns out to be accurate (i.e. they're going for extra keywords
rather than doc comment tags), there's no reason to suppose javadoc
@tags have to be identifiers and hence nothing to stop them containing
hyphens.

Guess I'm worrying about nothing, and we just have to wait for Sun to
fix javadoc again :-(  Still, at least we don't need to rewrite great
chunks of the templates :-)


Andrew.



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to