Java Code Examples for org.omg.CORBA.portable.IDLEntity

The following are top voted examples for showing how to use org.omg.CORBA.portable.IDLEntity. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 2
Project: openjdk-jdk10   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 3
Project: openjdk9   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 4
Project: lookaside_java-1.8.0-openjdk   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 5
Project: jdk8u_corba   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 6
Project: infobip-open-jdk-8   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 7
Project: openjdk-source-code-learn   File: RepositoryId_1_3_1.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 8
Project: openjdk-source-code-learn   File: RepositoryId_1_3.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 9
Project: openjdk-source-code-learn   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 10
Project: OLD-OpenJDK8   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 11
Project: openjdk-orb   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 12
Project: openjdk-icedtea7   File: RepositoryId.java   View source code 6 votes vote down vote up
/**
 * 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;
    }

}
 
Example 13
Project: OpenJSharp   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
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 ) ;
    }
}
 
Example 14
Project: OpenJSharp   File: DynamicMethodMarshallerImpl.java   View source code 5 votes vote down vote up
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 ) ;
}
 
Example 15
Project: OpenJSharp   File: RepositoryId.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
 
Example 16
Project: openjdk-jdk10   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
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 ) ;
    }
}
 
Example 17
Project: openjdk-jdk10   File: DynamicMethodMarshallerImpl.java   View source code 5 votes vote down vote up
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 ) ;
}
 
Example 18
Project: openjdk-jdk10   File: RepositoryId.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
 
Example 19
Project: openjdk9   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
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 ) ;
    }
}
 
Example 20
Project: openjdk9   File: DynamicMethodMarshallerImpl.java   View source code 5 votes vote down vote up
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 ) ;
}
 
Example 21
Project: openjdk9   File: RepositoryId.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
 
Example 22
Project: lookaside_java-1.8.0-openjdk   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
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 ) ;
    }
}
 
Example 23
Project: lookaside_java-1.8.0-openjdk   File: DynamicMethodMarshallerImpl.java   View source code 5 votes vote down vote up
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 ) ;
}
 
Example 24
Project: lookaside_java-1.8.0-openjdk   File: RepositoryId.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
 
Example 25
Project: jdk8u_corba   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
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 ) ;
    }
}
 
Example 26
Project: jdk8u_corba   File: DynamicMethodMarshallerImpl.java   View source code 5 votes vote down vote up
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 ) ;
}
 
Example 27
Project: jdk8u_corba   File: RepositoryId.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
 
Example 28
Project: javify   File: ObjectCreator.java   View source code 5 votes vote down vote up
/**
 * 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;
}
 
Example 29
Project: jvm-stm   File: ObjectCreator.java   View source code 5 votes vote down vote up
/**
 * 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;
}
 
Example 30
Project: infobip-open-jdk-8   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
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 ) ;
    }
}
 
Example 31
Project: infobip-open-jdk-8   File: DynamicMethodMarshallerImpl.java   View source code 5 votes vote down vote up
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 ) ;
}
 
Example 32
Project: infobip-open-jdk-8   File: RepositoryId.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
 
Example 33
Project: openjdk-source-code-learn   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
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 ) ;
    }
}
 
Example 34
Project: openjdk-source-code-learn   File: DynamicMethodMarshallerImpl.java   View source code 5 votes vote down vote up
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 ) ;
}
 
Example 35
Project: openjdk-source-code-learn   File: RepositoryId_1_3_1.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
 
Example 36
Project: openjdk-source-code-learn   File: RepositoryId_1_3.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
 
Example 37
Project: openjdk-source-code-learn   File: RepositoryId.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}
 
Example 38
Project: OLD-OpenJDK8   File: StubFactoryFactoryDynamicBase.java   View source code 5 votes vote down vote up
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 ) ;
    }
}
 
Example 39
Project: OLD-OpenJDK8   File: DynamicMethodMarshallerImpl.java   View source code 5 votes vote down vote up
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 ) ;
}
 
Example 40
Project: OLD-OpenJDK8   File: RepositoryId.java   View source code 5 votes vote down vote up
public static boolean isAbstractBase(Class clazz) {
    return (clazz.isInterface() &&
            IDLEntity.class.isAssignableFrom(clazz) &&
            (!ValueBase.class.isAssignableFrom(clazz)) &&
            (!org.omg.CORBA.Object.class.isAssignableFrom(clazz)));

}