Class IDLNameTranslatorImpl

java.lang.Object
com.sun.corba.ee.impl.presentation.rmi.IDLNameTranslatorImpl
All Implemented Interfaces:
IDLNameTranslator

public class IDLNameTranslatorImpl extends Object implements IDLNameTranslator
Bidirectional translator between RMI-IIOP interface methods and and IDL Names.
  • Method Details

    • get

      public static IDLNameTranslator get(Class interf)
      Return an IDLNameTranslator for the given interface.
      Parameters:
      interf - Interface to get translator for.
      Returns:
      IDLNameTranslator for specified interface.
      Throws:
      IllegalStateException - if given class is not a valid RMI/IIOP Remote Interface
    • get

      public static IDLNameTranslator get(Class[] interfaces)
      Return an IDLNameTranslator for the given interfaces.
      Parameters:
      interfaces - Interfaces to get a translator for
      Returns:
      IDLNameTranslator for specified interfaces.
      Throws:
      IllegalStateException - if given classes are not valid RMI/IIOP Remote Interfaces
    • getExceptionId

      public static String getExceptionId(Class cls)
    • getInterfaces

      public Class[] getInterfaces()
      Description copied from interface: IDLNameTranslator
      Get the interfaces that this IDLNameTranslator describes.
      Specified by:
      getInterfaces in interface IDLNameTranslator
      Returns:
      interfaces described
    • getMethods

      public Method[] getMethods()
      Description copied from interface: IDLNameTranslator
      Get all methods for this remote interface. The methods are returned in a canonical order, that is, they are always in the same order for a particular interface.
      Specified by:
      getMethods in interface IDLNameTranslator
      Returns:
      methods for interface
    • getMethod

      public Method getMethod(String idlName)
      Description copied from interface: IDLNameTranslator
      Get the method from this IDLNameTranslator's interfaces that corresponds to the mangled name idlName. Returns null if there is no matching method.
      Specified by:
      getMethod in interface IDLNameTranslator
      Parameters:
      idlName - name of method
      Returns:
      method with the specified name
    • getIDLName

      public String getIDLName(Method method)
      Description copied from interface: IDLNameTranslator
      Get the mangled name that corresponds to the given method on this IDLNameTranslator's interface. Returns null if there is no matching name.
      Specified by:
      getIDLName in interface IDLNameTranslator
      Parameters:
      method - method to get name of
      Returns:
      the corresponding name
    • charToUnicodeRepresentation

      public static String charToUnicodeRepresentation(char c)
      Returns Unicode mangling as defined in Section 1.3.2.4 of Java2IDL spec. "For Java identifiers that contain illegal OMG IDL identifier characters such as '$' or Unicode characters outside of ISO Latin 1, any such illegal characters are replaced by "U" followed by the 4 hexadecimal characters(in upper case) representing the Unicode value. So, the Java name a$b is mapped to aU0024b and xμy is mapped to xU03BCy."
      Parameters:
      c - character to convert
      Returns:
      Unicode String
    • toString

      public String toString()
      Overrides:
      toString in class Object