iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/ContainerAnalysis.java
protected void calculateRepositoryId() {
        if (cls.isArray() || cls.isPrimitive())
            throw IIOPLogger.ROOT_LOGGER.notAnClassOrInterface(cls.getName());

        if (cls.isInterface() &&
                org.omg.CORBA.Object.class.isAssignableFrom(cls) &&
                org.omg.CORBA.portable.IDLEntity.class.isAssignableFrom(cls)) {

            StringBuffer b = new StringBuffer("IDL:");
            b.append(cls.getPackage().getName().replace('.', '/'));
            b.append('/');
            String base = cls.getName();
            base = base.substring(base.lastIndexOf('.') + 1);
            b.append(base).append(":1.0");
            repositoryId = b.toString();
        } else {
            StringBuffer b = new StringBuffer("RMI:");
            b.append(escapeIRName(cls.getName()));
            memberPrefix = b.toString() + ".";
            String hashStr = toHexString(classHashCode);
            b.append(':').append(hashStr);
            ObjectStreamClass osClass = ObjectStreamClass.lookup(cls);
            if (osClass != null) {
                long serialVersionUID = osClass.getSerialVersionUID();
                String SVUID = toHexString(serialVersionUID);

                if (classHashCode != serialVersionUID)
                    b.append(':').append(SVUID);
                memberPostfix = ":" + hashStr + ":" + SVUID;
            } else
                memberPostfix = ":" + hashStr;

            repositoryId = b.toString();
        }
    }
protected void calculateRepositoryId() {
        if (cls.isArray() || cls.isPrimitive())
            throw IIOPLogger.ROOT_LOGGER.notAnClassOrInterface(cls.getName());

        if (cls.isInterface() &&
                org.omg.CORBA.Object.class.isAssignableFrom(cls) &&
                org.omg.CORBA.portable.IDLEntity.class.isAssignableFrom(cls)) {

            StringBuffer b = new StringBuffer("IDL:");
            b.append(cls.getPackage().getName().replace('.', '/'));
            b.append('/');
            String base = cls.getName();
            base = base.substring(base.lastIndexOf('.') + 1);
            b.append(base).append(":1.0");
            repositoryId = b.toString();
        } else {
            StringBuffer b = new StringBuffer("RMI:");
            b.append(escapeIRName(cls.getName()));
            memberPrefix = b.toString() + ".";
            String hashStr = toHexString(classHashCode);
            b.append(':').append(hashStr);
            ObjectStreamClass osClass = ObjectStreamClass.lookup(cls);
            if (osClass != null) {
                long serialVersionUID = osClass.getSerialVersionUID();
                String SVUID = toHexString(serialVersionUID);

                if (classHashCode != serialVersionUID)
                    b.append(':').append(SVUID);
                memberPostfix = ":" + hashStr + ":" + SVUID;
            } else
                memberPostfix = ":" + hashStr;

            repositoryId = b.toString();
        }
    }
protected void calculateRepositoryId ( ) { if ( cls . isArray ( ) || cls . isPrimitive ( ) ) throw IIOPLogger . ROOT_LOGGER . notAnClassOrInterface ( cls . getName ( ) ) ; if ( cls . isInterface ( ) && org . omg . CORBA . Object . class . isAssignableFrom ( cls ) && org . omg . CORBA . portable . IDLEntity . class . isAssignableFrom ( cls ) ) { StringBuffer b = new StringBuffer ( "IDL:" ) ; b . append ( cls . getPackage ( ) . getName ( ) . replace ( ' ' , ' ' ) ) ; b . append ( ' ' ) ; String base = cls . getName ( ) ; base = base . substring ( base . lastIndexOf ( ' ' ) + 1 ) ; b . append ( base ) . append ( ":1.0" ) ; repositoryId = b . toString ( ) ; } else { StringBuffer b = new StringBuffer ( "RMI:" ) ; b . append ( escapeIRName ( cls . getName ( ) ) ) ; memberPrefix = b . toString ( ) + "." ; String hashStr = toHexString ( classHashCode ) ; b . append ( ' ' ) . append ( hashStr ) ; ObjectStreamClass osClass = ObjectStreamClass . lookup ( cls ) ; if ( osClass != null ) { long serialVersionUID = osClass . getSerialVersionUID ( ) ; String SVUID = toHexString ( serialVersionUID ) ; if ( classHashCode != serialVersionUID ) b . append ( ' ' ) . append ( SVUID ) ; memberPostfix = ":" + hashStr + ":" + SVUID ; } else memberPostfix = ":" + hashStr ; repositoryId = b . toString ( ) ; } }
Return the IR global ID of the given class or interface.
This is described in section 1.3.5.7.
The returned string is in the RMI hashed format, like
"RMI:java.util.Hashtable:C03324C0EA357270:13BB0F25214AE4B8".
Return the IR global ID of the given class or interface . This is described in section 1 . 3 . 5 . 7 . The returned string is in the RMI hashed format like RMI : java . util . Hashtable : C03324C0EA357270 : 13BB0F25214AE4B8 .