org.omg.CORBA.portable.IDLEntity Java Examples

The following examples show how to use org.omg.CORBA.portable.IDLEntity. 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 File: RepositoryId.java    From jdk1.8-source-analysis with 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 File: RepositoryId.java    From TencentKona-8 with 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 File: RepositoryId.java    From jdk8u60 with 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 File: RepositoryId.java    From JDKSourceCode1.8 with 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 File: RepositoryId.java    From openjdk-jdk8u with 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
Source File: RepositoryId.java    From openjdk-jdk8u-backup with 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 #7
Source File: RepositoryId.java    From openjdk-jdk9 with 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 File: RepositoryId.java    From hottub with 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
Source File: RepositoryId.java    From openjdk-8-source with 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 #10
Source File: RepositoryId.java    From openjdk-8 with 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
Source File: StubFactoryFactoryDynamicBase.java    From jdk1.8-source-analysis with Apache License 2.0 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 #12
Source File: DynamicMethodMarshallerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 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 #13
Source File: RepositoryId.java    From jdk1.8-source-analysis with 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
Source File: StubFactoryFactoryDynamicBase.java    From TencentKona-8 with GNU General Public License v2.0 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 #15
Source File: DynamicMethodMarshallerImpl.java    From TencentKona-8 with GNU General Public License v2.0 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 #16
Source File: RepositoryId.java    From TencentKona-8 with 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
Source File: StubFactoryFactoryDynamicBase.java    From jdk8u60 with GNU General Public License v2.0 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 #18
Source File: DynamicMethodMarshallerImpl.java    From jdk8u60 with GNU General Public License v2.0 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 #19
Source File: RepositoryId.java    From jdk8u60 with 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 File: StubFactoryFactoryDynamicBase.java    From JDKSourceCode1.8 with 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 File: DynamicMethodMarshallerImpl.java    From JDKSourceCode1.8 with 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 File: RepositoryId.java    From JDKSourceCode1.8 with 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
Source File: StubFactoryFactoryDynamicBase.java    From openjdk-jdk8u with GNU General Public License v2.0 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 #24
Source File: DynamicMethodMarshallerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 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 #25
Source File: RepositoryId.java    From openjdk-jdk8u with 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
Source File: StubFactoryFactoryDynamicBase.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 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 #27
Source File: DynamicMethodMarshallerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 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 #28
Source File: RepositoryId.java    From openjdk-jdk8u-backup with 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 #29
Source File: StubFactoryFactoryDynamicBase.java    From openjdk-jdk9 with GNU General Public License v2.0 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 #30
Source File: DynamicMethodMarshallerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 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 ) ;
}