久しぶりにドメインを取り、Java パッケージ名に使おうと思ったら、数字から始まるものは利用できなかった。このような場合は、アンダースコアを使って、回避をするように決まっている。
- If the domain name contains a hyphen, or any other special character not allowed in an identifier (§3.8), convert it into an underscore.
- If any of the resulting package name components are keywords (§3.9) then append underscore to them.
- If any of the resulting package name components start with a digit, or any other character that is not allowed as an initial character of an identifier, have an underscore prefixed to the component.
従って、たとえば 12345.domain をパッケージ名として利用する場合、domain._12345 となる。
Related Entries
There is not related articles.
Trackbacks
Trackback URI: http://blog.c--v.net/trackback/2010/07/10/1
There is no trackback.
There is no comment.