Hello,
is there any utility class to check the validity of package, class, and
method names given as String?
Valid: In terms of the the Java Language Specification, especially
http://java.sun.com/docs/books/jls/first_edition/html/3.doc.html#40625?
Thanks,
Martin
Roland - 30 Jun 2005 13:05 GMT
> Hello,
>
[quoted text clipped - 6 lines]
> Thanks,
> Martin
Don't know of a method that checks an entire string, but the Character
class has static methods for validation of java identifiers:
isJavaIdentifierStart
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html#isJavaIdentifie
rStart(char)>
isJavaIdentifierPart
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html#isJavaIdentifie
rPart(char)>

Signature
Regards,
Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \
Martin Burger - 30 Jun 2005 13:35 GMT
Hello Roland!
I hope there's any class that implemented a check using exactly the
methods mentioned by you.
:-)
Regards,
Martin
Roland - 30 Jun 2005 13:47 GMT
> Hello Roland!
>
[quoted text clipped - 5 lines]
> Regards,
> Martin
Just a wild guess: maybe some class/es in the com.sun.tools.javac.*
package hierarchy :-P

Signature
Regards,
Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \