java类org.omg.CORBA.portable.IDLEntity的实例源码

RepositoryId.java 文件源码 项目:OpenJSharp 阅读 20 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId.java 文件源码 项目:openjdk-jdk10 阅读 24 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId.java 文件源码 项目:openjdk9 阅读 20 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId.java 文件源码 项目:lookaside_java-1.8.0-openjdk 阅读 22 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId.java 文件源码 项目:jdk8u_corba 阅读 24 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId.java 文件源码 项目:infobip-open-jdk-8 阅读 21 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId_1_3_1.java 文件源码 项目:openjdk-source-code-learn 阅读 27 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId_1_3.java 文件源码 项目:openjdk-source-code-learn 阅读 27 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId.java 文件源码 项目:openjdk-source-code-learn 阅读 22 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId.java 文件源码 项目:OLD-OpenJDK8 阅读 23 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId.java 文件源码 项目:openjdk-orb 阅读 32 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
RepositoryId.java 文件源码 项目:openjdk-icedtea7 阅读 22 收藏 0 点赞 0 评论 0
/**
 * Createa a repository ID for the type if it is either a java type
 * or an IDL type.
 * @param type The type to create rep. id for
 * @return The rep. id.
 **/
public static String createForAnyType(Class type) {
    try{
        if (type.isArray())
            return createSequenceRepID(type);
        else if (IDLEntity.class.isAssignableFrom(type))
            {
                try{
                    return getIdFromHelper(type);
                }
                catch(Throwable t) {
                    return createForIDLType(type, 1, 0);
                }
            }
        else return createForJavaType(type);
    }
    catch(com.sun.corba.se.impl.io.TypeMismatchException e){
        return null;
    }

}
StubFactoryFactoryDynamicBase.java 文件源码 项目:OpenJSharp 阅读 32 收藏 0 点赞 0 评论 0
public PresentationManager.StubFactory createStubFactory(
    String className, boolean isIDLStub, String remoteCodeBase,
    Class expectedClass, ClassLoader classLoader)
{
    Class cls = null ;

    try {
        cls = Util.loadClass( className, remoteCodeBase, classLoader ) ;
    } catch (ClassNotFoundException exc) {
        throw wrapper.classNotFound3(
            CompletionStatus.COMPLETED_MAYBE, exc, className ) ;
    }

    PresentationManager pm = ORB.getPresentationManager() ;

    if (IDLEntity.class.isAssignableFrom( cls ) &&
        !Remote.class.isAssignableFrom( cls )) {
        // IDL stubs must always use static factories.
        PresentationManager.StubFactoryFactory sff =
            pm.getStubFactoryFactory( false ) ;
        PresentationManager.StubFactory sf =
            sff.createStubFactory( className, true, remoteCodeBase,
                expectedClass, classLoader ) ;
        return sf ;
    } else {
        PresentationManager.ClassData classData = pm.getClassData( cls ) ;
        return makeDynamicStubFactory( pm, classData, classLoader ) ;
    }
}
DynamicMethodMarshallerImpl.java 文件源码 项目:OpenJSharp 阅读 21 收藏 0 点赞 0 评论 0
private static boolean isAbstractInterface( Class cls )
{
    // Either cls is an interface that extends IDLEntity, or else
    // cls does not extend java.rmi.Remote and all of its methods
    // throw RemoteException.
    if (IDLEntity.class.isAssignableFrom( cls ))
        return cls.isInterface() ;
    else
        return cls.isInterface() && allMethodsThrowRemoteException( cls ) ;
}
RepositoryId.java 文件源码 项目:OpenJSharp 阅读 22 收藏 0 点赞 0 评论 0
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
StubFactoryFactoryDynamicBase.java 文件源码 项目:openjdk-jdk10 阅读 26 收藏 0 点赞 0 评论 0
public PresentationManager.StubFactory createStubFactory(
    String className, boolean isIDLStub, String remoteCodeBase,
    Class expectedClass, ClassLoader classLoader)
{
    Class cls = null ;

    try {
        cls = Util.loadClass( className, remoteCodeBase, classLoader ) ;
    } catch (ClassNotFoundException exc) {
        throw wrapper.classNotFound3(
            CompletionStatus.COMPLETED_MAYBE, exc, className ) ;
    }

    PresentationManager pm = ORB.getPresentationManager() ;

    if (IDLEntity.class.isAssignableFrom( cls ) &&
        !Remote.class.isAssignableFrom( cls )) {
        // IDL stubs must always use static factories.
        PresentationManager.StubFactoryFactory sff =
            pm.getStubFactoryFactory( false ) ;
        PresentationManager.StubFactory sf =
            sff.createStubFactory( className, true, remoteCodeBase,
                expectedClass, classLoader ) ;
        return sf ;
    } else {
        PresentationManager.ClassData classData = pm.getClassData( cls ) ;
        return makeDynamicStubFactory( pm, classData, classLoader ) ;
    }
}
DynamicMethodMarshallerImpl.java 文件源码 项目:openjdk-jdk10 阅读 23 收藏 0 点赞 0 评论 0
private static boolean isAbstractInterface( Class cls )
{
    // Either cls is an interface that extends IDLEntity, or else
    // cls does not extend java.rmi.Remote and all of its methods
    // throw RemoteException.
    if (IDLEntity.class.isAssignableFrom( cls ))
        return cls.isInterface() ;
    else
        return cls.isInterface() && allMethodsThrowRemoteException( cls ) ;
}
RepositoryId.java 文件源码 项目:openjdk-jdk10 阅读 23 收藏 0 点赞 0 评论 0
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
StubFactoryFactoryDynamicBase.java 文件源码 项目:openjdk9 阅读 26 收藏 0 点赞 0 评论 0
public PresentationManager.StubFactory createStubFactory(
    String className, boolean isIDLStub, String remoteCodeBase,
    Class expectedClass, ClassLoader classLoader)
{
    Class cls = null ;

    try {
        cls = Util.loadClass( className, remoteCodeBase, classLoader ) ;
    } catch (ClassNotFoundException exc) {
        throw wrapper.classNotFound3(
            CompletionStatus.COMPLETED_MAYBE, exc, className ) ;
    }

    PresentationManager pm = ORB.getPresentationManager() ;

    if (IDLEntity.class.isAssignableFrom( cls ) &&
        !Remote.class.isAssignableFrom( cls )) {
        // IDL stubs must always use static factories.
        PresentationManager.StubFactoryFactory sff =
            pm.getStubFactoryFactory( false ) ;
        PresentationManager.StubFactory sf =
            sff.createStubFactory( className, true, remoteCodeBase,
                expectedClass, classLoader ) ;
        return sf ;
    } else {
        PresentationManager.ClassData classData = pm.getClassData( cls ) ;
        return makeDynamicStubFactory( pm, classData, classLoader ) ;
    }
}
DynamicMethodMarshallerImpl.java 文件源码 项目:openjdk9 阅读 30 收藏 0 点赞 0 评论 0
private static boolean isAbstractInterface( Class cls )
{
    // Either cls is an interface that extends IDLEntity, or else
    // cls does not extend java.rmi.Remote and all of its methods
    // throw RemoteException.
    if (IDLEntity.class.isAssignableFrom( cls ))
        return cls.isInterface() ;
    else
        return cls.isInterface() && allMethodsThrowRemoteException( cls ) ;
}
RepositoryId.java 文件源码 项目:openjdk9 阅读 22 收藏 0 点赞 0 评论 0
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
StubFactoryFactoryDynamicBase.java 文件源码 项目:lookaside_java-1.8.0-openjdk 阅读 31 收藏 0 点赞 0 评论 0
public PresentationManager.StubFactory createStubFactory(
    String className, boolean isIDLStub, String remoteCodeBase,
    Class expectedClass, ClassLoader classLoader)
{
    Class cls = null ;

    try {
        cls = Util.loadClass( className, remoteCodeBase, classLoader ) ;
    } catch (ClassNotFoundException exc) {
        throw wrapper.classNotFound3(
            CompletionStatus.COMPLETED_MAYBE, exc, className ) ;
    }

    PresentationManager pm = ORB.getPresentationManager() ;

    if (IDLEntity.class.isAssignableFrom( cls ) &&
        !Remote.class.isAssignableFrom( cls )) {
        // IDL stubs must always use static factories.
        PresentationManager.StubFactoryFactory sff =
            pm.getStubFactoryFactory( false ) ;
        PresentationManager.StubFactory sf =
            sff.createStubFactory( className, true, remoteCodeBase,
                expectedClass, classLoader ) ;
        return sf ;
    } else {
        PresentationManager.ClassData classData = pm.getClassData( cls ) ;
        return makeDynamicStubFactory( pm, classData, classLoader ) ;
    }
}
DynamicMethodMarshallerImpl.java 文件源码 项目:lookaside_java-1.8.0-openjdk 阅读 23 收藏 0 点赞 0 评论 0
private static boolean isAbstractInterface( Class cls )
{
    // Either cls is an interface that extends IDLEntity, or else
    // cls does not extend java.rmi.Remote and all of its methods
    // throw RemoteException.
    if (IDLEntity.class.isAssignableFrom( cls ))
        return cls.isInterface() ;
    else
        return cls.isInterface() && allMethodsThrowRemoteException( cls ) ;
}
RepositoryId.java 文件源码 项目:lookaside_java-1.8.0-openjdk 阅读 22 收藏 0 点赞 0 评论 0
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
StubFactoryFactoryDynamicBase.java 文件源码 项目:jdk8u_corba 阅读 27 收藏 0 点赞 0 评论 0
public PresentationManager.StubFactory createStubFactory(
    String className, boolean isIDLStub, String remoteCodeBase,
    Class expectedClass, ClassLoader classLoader)
{
    Class cls = null ;

    try {
        cls = Util.loadClass( className, remoteCodeBase, classLoader ) ;
    } catch (ClassNotFoundException exc) {
        throw wrapper.classNotFound3(
            CompletionStatus.COMPLETED_MAYBE, exc, className ) ;
    }

    PresentationManager pm = ORB.getPresentationManager() ;

    if (IDLEntity.class.isAssignableFrom( cls ) &&
        !Remote.class.isAssignableFrom( cls )) {
        // IDL stubs must always use static factories.
        PresentationManager.StubFactoryFactory sff =
            pm.getStubFactoryFactory( false ) ;
        PresentationManager.StubFactory sf =
            sff.createStubFactory( className, true, remoteCodeBase,
                expectedClass, classLoader ) ;
        return sf ;
    } else {
        PresentationManager.ClassData classData = pm.getClassData( cls ) ;
        return makeDynamicStubFactory( pm, classData, classLoader ) ;
    }
}
DynamicMethodMarshallerImpl.java 文件源码 项目:jdk8u_corba 阅读 22 收藏 0 点赞 0 评论 0
private static boolean isAbstractInterface( Class cls )
{
    // Either cls is an interface that extends IDLEntity, or else
    // cls does not extend java.rmi.Remote and all of its methods
    // throw RemoteException.
    if (IDLEntity.class.isAssignableFrom( cls ))
        return cls.isInterface() ;
    else
        return cls.isInterface() && allMethodsThrowRemoteException( cls ) ;
}
RepositoryId.java 文件源码 项目:jdk8u_corba 阅读 26 收藏 0 点赞 0 评论 0
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
ObjectCreator.java 文件源码 项目:javify 阅读 29 收藏 0 点赞 0 评论 0
/**
 * Convert the class name to IDL or RMI name (repository id). If the class
 * inherits from IDLEntity, ValueBase or SystemException, returns repository
 * Id in the IDL:(..) form. If it does not, returns repository Id in the
 * RMI:(..) form.
 *
 * @param cx the class for that the name must be computed.
 *
 * @return the idl or rmi name.
 */
public static synchronized String getRepositoryId(Class cx)
{
  String name = (String) m_names.get(cx);
  if (name != null)
    return name;

  String cn = cx.getName();
  if (!(IDLEntity.class.isAssignableFrom(cx)
    || ValueBase.class.isAssignableFrom(cx) || SystemException.class.isAssignableFrom(cx)))
    {
      // Not an IDL entity.
      name = Util.createValueHandler().getRMIRepositoryID(cx);
    }
  else
    {
      if (cn.startsWith(JAVA_PREFIX))
        cn = OMG_PREFIX
          + cn.substring(JAVA_PREFIX.length()).replace('.', '/');
      else if (cn.startsWith(CLASSPATH_PREFIX))
        cn = OMG_PREFIX
          + cn.substring(CLASSPATH_PREFIX.length()).replace('.', '/');

      name = "IDL:" + cn + ":1.0";
    }
  m_names.put(cx, name);
  return name;
}
ObjectCreator.java 文件源码 项目:jvm-stm 阅读 23 收藏 0 点赞 0 评论 0
/**
 * Convert the class name to IDL or RMI name (repository id). If the class
 * inherits from IDLEntity, ValueBase or SystemException, returns repository
 * Id in the IDL:(..) form. If it does not, returns repository Id in the
 * RMI:(..) form.
 * 
 * @param cx the class for that the name must be computed.
 * 
 * @return the idl or rmi name.
 */
public static synchronized String getRepositoryId(Class cx)
{
  String name = (String) m_names.get(cx);
  if (name != null)
    return name;

  String cn = cx.getName();
  if (!(IDLEntity.class.isAssignableFrom(cx)
    || ValueBase.class.isAssignableFrom(cx) || SystemException.class.isAssignableFrom(cx)))
    {
      // Not an IDL entity.
      name = Util.createValueHandler().getRMIRepositoryID(cx);
    }
  else
    {
      if (cn.startsWith(JAVA_PREFIX))
        cn = OMG_PREFIX
          + cn.substring(JAVA_PREFIX.length()).replace('.', '/');
      else if (cn.startsWith(CLASSPATH_PREFIX))
        cn = OMG_PREFIX
          + cn.substring(CLASSPATH_PREFIX.length()).replace('.', '/');

      name = "IDL:" + cn + ":1.0";
    }
  m_names.put(cx, name);
  return name;
}
StubFactoryFactoryDynamicBase.java 文件源码 项目:infobip-open-jdk-8 阅读 57 收藏 0 点赞 0 评论 0
public PresentationManager.StubFactory createStubFactory(
    String className, boolean isIDLStub, String remoteCodeBase,
    Class expectedClass, ClassLoader classLoader)
{
    Class cls = null ;

    try {
        cls = Util.loadClass( className, remoteCodeBase, classLoader ) ;
    } catch (ClassNotFoundException exc) {
        throw wrapper.classNotFound3(
            CompletionStatus.COMPLETED_MAYBE, exc, className ) ;
    }

    PresentationManager pm = ORB.getPresentationManager() ;

    if (IDLEntity.class.isAssignableFrom( cls ) &&
        !Remote.class.isAssignableFrom( cls )) {
        // IDL stubs must always use static factories.
        PresentationManager.StubFactoryFactory sff =
            pm.getStubFactoryFactory( false ) ;
        PresentationManager.StubFactory sf =
            sff.createStubFactory( className, true, remoteCodeBase,
                expectedClass, classLoader ) ;
        return sf ;
    } else {
        PresentationManager.ClassData classData = pm.getClassData( cls ) ;
        return makeDynamicStubFactory( pm, classData, classLoader ) ;
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号