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

The following examples show how to use org.omg.CORBA.portable.IDLEntity. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: jdk1.8-source-analysis   Source File: RepositoryId.java    License: Apache License 2.0 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
Source Project: TencentKona-8   Source File: RepositoryId.java    License: GNU General Public License v2.0 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
Source Project: jdk8u60   Source File: RepositoryId.java    License: GNU General Public License v2.0 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
Source Project: JDKSourceCode1.8   Source File: RepositoryId.java    License: MIT License 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
Source Project: openjdk-jdk8u   Source File: RepositoryId.java    License: GNU General Public License v2.0 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
/**
 * 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
Source Project: openjdk-jdk9   Source File: RepositoryId.java    License: GNU General Public License v2.0 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
Source Project: hottub   Source File: RepositoryId.java    License: GNU General Public License v2.0 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
/**
 * 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
Source Project: openjdk-8   Source File: RepositoryId.java    License: GNU General Public License v2.0 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
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 12
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 13
Source Project: jdk1.8-source-analysis   Source File: RepositoryId.java    License: Apache License 2.0 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 14
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 15
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 16
Source Project: TencentKona-8   Source File: RepositoryId.java    License: GNU General Public License v2.0 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 17
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 18
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 19
Source Project: jdk8u60   Source File: RepositoryId.java    License: GNU General Public License v2.0 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 20
Source Project: JDKSourceCode1.8   Source File: StubFactoryFactoryDynamicBase.java    License: MIT License 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 21
Source Project: JDKSourceCode1.8   Source File: DynamicMethodMarshallerImpl.java    License: MIT License 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 22
Source Project: JDKSourceCode1.8   Source File: RepositoryId.java    License: MIT License 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 23
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 24
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 25
Source Project: openjdk-jdk8u   Source File: RepositoryId.java    License: GNU General Public License v2.0 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 26
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 27
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 28
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 29
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 30
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 ) ;
}