当前位置: 首页>>代码示例>>Java>>正文


Java IDLType类代码示例

本文整理汇总了Java中com.sun.corba.se.impl.presentation.rmi.IDLType的典型用法代码示例。如果您正苦于以下问题:Java IDLType类的具体用法?Java IDLType怎么用?Java IDLType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IDLType类属于com.sun.corba.se.impl.presentation.rmi包,在下文中一共展示了IDLType类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getExceptionId

import com.sun.corba.se.impl.presentation.rmi.IDLType; //导入依赖的package包/类
public static String getExceptionId( Class cls )
{
    // Requirements for this method:
    // 1. cls must be an exception but not a RemoteException.
    // 2. If cls has an IDL keyword name, an underscore is prepended (1.3.2.2).
    // 3. If cls jas a leading underscore, J is prepended (1.3.2.3).
    // 4. If cls has an illegal IDL ident char, it is mapped to UXXXX where
    //    XXXX is the unicode value in hex of the char (1.3.2.4).
    // 5. double underscore for inner class (1.3.2.5).
    // 6. The ID is "IDL:" + name with / separators + ":1.0".
    IDLType itype = classToIDLType( cls ) ;
    return itype.getExceptionName() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:IDLNameTranslatorImpl.java

示例2: mangleOverloadedMethod

import com.sun.corba.se.impl.presentation.rmi.IDLType; //导入依赖的package包/类
/**
 * Mangle an overloaded method name as defined in Section 1.3.2.6 of
 * Java2IDL spec.  Current value of method name is passed in as argument.
 * We can't start from original method name since the name might have
 * been partially mangled as a result of the other rules.
 */
private static String mangleOverloadedMethod(String mangledName, Method m) {

    IDLTypesUtil idlTypesUtil = new IDLTypesUtil();

    // Start by appending the separator string
    String newMangledName = mangledName + OVERLOADED_TYPE_SEPARATOR;

    Class[] parameterTypes = m.getParameterTypes();

    for(int i = 0; i < parameterTypes.length; i++) {
        Class nextParamType = parameterTypes[i];

        if( i > 0 ) {
            newMangledName = newMangledName + OVERLOADED_TYPE_SEPARATOR;
        }
        IDLType idlType = classToIDLType(nextParamType);

        String moduleName = idlType.getModuleName();
        String memberName = idlType.getMemberName();

        String typeName = (moduleName.length() > 0) ?
            moduleName + UNDERSCORE + memberName : memberName;

        if( !idlTypesUtil.isPrimitive(nextParamType) &&
            (idlTypesUtil.getSpecialCaseIDLTypeMapping(nextParamType)
             == null) &&
            isIDLKeyword(typeName) ) {
            typeName = mangleIDLKeywordClash(typeName);
        }

        typeName = mangleUnicodeChars(typeName);

        newMangledName = newMangledName + typeName;
    }

    return newMangledName;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:44,代码来源:IDLNameTranslatorImpl.java


注:本文中的com.sun.corba.se.impl.presentation.rmi.IDLType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。