Identifiers can name various IDL constructs, such as modules, interfaces, and constants. In IDL, an identifier has to follow these rules:

  • It can be any length of alphanumeric characters from the ISO Latin-1[46] character set (e.g., a-z, A-Z, 0-9, plus various characters with accents, graves, tildes, etc.), and the underscore character ( _ ).

  • All characters in an identifier are significant.

  • The first character must be an alphabetic character.

  • Identifiers are case-insensitive, in the sense that two identifiers that differ only by case are considered a name collision and will cause an IDL compiler error. This rule stems from the fact that IDL needs to be mappable into many implementation languages, some of which are case-insensitive.

  • Identifiers must be spelled and capitalized consistently throughout an IDL file.

  • All IDL identifiers share the same namespace, so interfaces, modules, user-defined types, etc. within the same scope all must have unique identifiers. An interface named List and a module named List within the same scope will cause a name collision and an IDL compiler error. See the section “Naming Scopes” for more details.

Mapping Identifiers to Java

An IDL-to-Java compiler attempts to map all IDL identifiers unchanged into equivalent Java identifiers.

An exception is the case where a mapped identifier conflicts with an identifier created automatically by the IDL compiler. IDL interfaces, for example, when they are mapped to Java, have two additional Java interfaces ...

Get Java Enterprise in a Nutshell, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.