Main page / Java Connectivity page

JavaNames - Java Names starting with $, _, ...


Description: 
	Java names may contain characters illegal within OMG IDL identifiers, like '$' or other 
	illegal Unicode character (i.e. outside ISO Latin 1). These characters will be replaced
	(according to the OMG Java-to-IDL mapping) with an 'U' followed by 4 upper case hexadecimal 
	characters representing the Unicode value of the replaced character.
	
	Another problem may be a leading underscore which serves as escape character for IDL identifiers 
	colliding with reserved OMG IDL keywords. The underscore, however, is not transmitted over the wire. 
	To circumvent the lack of an underscore all Java identifiers with a leading underscore acquire a 'J_' 
	instead of the plain underscore.
	
	The example shows this behavior.  
	

Source: 
	MinCor\DemoJava\JavaNames


Mapping: 
	_name           <--->    J_name
	Unicode char    <--->    Uxxxx



Example 

The Java server:

    Interface     : JavaNames\Greetings.java
    Implementation: JavaNames\GreetingsImpl.java

    
    public interface Greetings extends Remote  {

        boolean _foo() 
            throws RemoteException;

        int  FeeIn$US() 
            throws RemoteException;
    }	
    

The .Net client:

    Implementation: ClientImpl.cs
    IDL-File      : Arrays.idl
    Generated     : JavaNames.cs
          

    Call the Server
          
      
    // ...
    a_oFrmClt.writeLog(oGreetings.J_foo().ToString());
    a_oFrmClt.writeLog(oGreetings.FeeInU0024US().ToString());
    // ...