Java Code Examples for com.sun.corba.se.impl.util.RepositoryId#isAbstractBase()

The following examples show how to use com.sun.corba.se.impl.util.RepositoryId#isAbstractBase() . 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: IIOPOutputStream.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 2
Source File: ValueHandlerImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}
 
Example 3
Source File: IIOPOutputStream.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 4
Source File: ValueHandlerImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}
 
Example 5
Source File: IIOPOutputStream.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 6
Source File: ValueHandlerImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}
 
Example 7
Source File: IIOPOutputStream.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 8
Source File: ValueHandlerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}
 
Example 9
Source File: IIOPOutputStream.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 10
Source File: ValueHandlerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}
 
Example 11
Source File: IIOPOutputStream.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 12
Source File: ValueHandlerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}
 
Example 13
Source File: IIOPOutputStream.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 14
Source File: ValueHandlerImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}
 
Example 15
Source File: IIOPOutputStream.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 16
Source File: ValueHandlerImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}
 
Example 17
Source File: IIOPOutputStream.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 18
Source File: ValueHandlerImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}
 
Example 19
Source File: IIOPOutputStream.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 20
Source File: ValueHandlerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public boolean isAbstractBase(Class clazz)
{
   return RepositoryId.isAbstractBase(clazz);
}