org.omg.CORBA.ValueMember Java Examples

The following examples show how to use org.omg.CORBA.ValueMember. 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   Author: raysonfang   File: IIOPInputStream.java    License: Apache License 2.0 6 votes vote down vote up
private void skipCustomUsingFVD(ValueMember[] fields,
                                com.sun.org.omg.SendingContext.CodeBase sender)
                                throws InvalidClassException, StreamCorruptedException,
                                       ClassNotFoundException, IOException
{
    readFormatVersion();
    boolean calledDefaultWriteObject = readBoolean();

    if (calledDefaultWriteObject)
        throwAwayData(fields, sender);

    if (getStreamFormatVersion() == 2) {

        ((ValueInputStream)getOrbStream()).start_value();
        ((ValueInputStream)getOrbStream()).end_value();
    }
}
 
Example #2
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ObjectStreamClass.java    License: Apache License 2.0 6 votes vote down vote up
public boolean hasField(ValueMember field)
{
    try {
        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getName().equals(field.name)) {
                if (fields[i].getSignature().equals(
                    ValueUtility.getSignature(field)))
                    return true;
            }
        }
    } catch (Exception exc) {
        // Ignore this; all we want to do is return false
        // Note that ValueUtility.getSignature can throw checked exceptions.
    }

    return false;
}
 
Example #3
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ValueUtility.java    License: Apache License 2.0 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #4
Source Project: openjdk-8   Author: bpupadhyaya   File: ValueUtility.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #5
Source Project: openjdk-8   Author: bpupadhyaya   File: IIOPInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
private void skipCustomUsingFVD(ValueMember[] fields,
                                com.sun.org.omg.SendingContext.CodeBase sender)
                                throws InvalidClassException, StreamCorruptedException,
                                       ClassNotFoundException, IOException
{
    readFormatVersion();
    boolean calledDefaultWriteObject = readBoolean();

    if (calledDefaultWriteObject)
        throwAwayData(fields, sender);

    if (getStreamFormatVersion() == 2) {

        ((ValueInputStream)getOrbStream()).start_value();
        ((ValueInputStream)getOrbStream()).end_value();
    }
}
 
Example #6
Source Project: TencentKona-8   Author: Tencent   File: IIOPInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
private void skipCustomUsingFVD(ValueMember[] fields,
                                com.sun.org.omg.SendingContext.CodeBase sender)
                                throws InvalidClassException, StreamCorruptedException,
                                       ClassNotFoundException, IOException
{
    readFormatVersion();
    boolean calledDefaultWriteObject = readBoolean();

    if (calledDefaultWriteObject)
        throwAwayData(fields, sender);

    if (getStreamFormatVersion() == 2) {

        ((ValueInputStream)getOrbStream()).start_value();
        ((ValueInputStream)getOrbStream()).end_value();
    }
}
 
Example #7
Source Project: TencentKona-8   Author: Tencent   File: ObjectStreamClass.java    License: GNU General Public License v2.0 6 votes vote down vote up
public boolean hasField(ValueMember field)
{
    try {
        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getName().equals(field.name)) {
                if (fields[i].getSignature().equals(
                    ValueUtility.getSignature(field)))
                    return true;
            }
        }
    } catch (Exception exc) {
        // Ignore this; all we want to do is return false
        // Note that ValueUtility.getSignature can throw checked exceptions.
    }

    return false;
}
 
Example #8
Source Project: TencentKona-8   Author: Tencent   File: ValueUtility.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #9
Source Project: jdk8u60   Author: chenghanpeng   File: IIOPInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
private void skipCustomUsingFVD(ValueMember[] fields,
                                com.sun.org.omg.SendingContext.CodeBase sender)
                                throws InvalidClassException, StreamCorruptedException,
                                       ClassNotFoundException, IOException
{
    readFormatVersion();
    boolean calledDefaultWriteObject = readBoolean();

    if (calledDefaultWriteObject)
        throwAwayData(fields, sender);

    if (getStreamFormatVersion() == 2) {

        ((ValueInputStream)getOrbStream()).start_value();
        ((ValueInputStream)getOrbStream()).end_value();
    }
}
 
Example #10
Source Project: jdk8u60   Author: chenghanpeng   File: ObjectStreamClass.java    License: GNU General Public License v2.0 6 votes vote down vote up
public boolean hasField(ValueMember field)
{
    try {
        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getName().equals(field.name)) {
                if (fields[i].getSignature().equals(
                    ValueUtility.getSignature(field)))
                    return true;
            }
        }
    } catch (Exception exc) {
        // Ignore this; all we want to do is return false
        // Note that ValueUtility.getSignature can throw checked exceptions.
    }

    return false;
}
 
Example #11
Source Project: jdk8u60   Author: chenghanpeng   File: ValueUtility.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #12
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: IIOPInputStream.java    License: MIT License 6 votes vote down vote up
private void skipCustomUsingFVD(ValueMember[] fields,
                                com.sun.org.omg.SendingContext.CodeBase sender)
                                throws InvalidClassException, StreamCorruptedException,
                                       ClassNotFoundException, IOException
{
    readFormatVersion();
    boolean calledDefaultWriteObject = readBoolean();

    if (calledDefaultWriteObject)
        throwAwayData(fields, sender);

    if (getStreamFormatVersion() == 2) {

        ((ValueInputStream)getOrbStream()).start_value();
        ((ValueInputStream)getOrbStream()).end_value();
    }
}
 
Example #13
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ObjectStreamClass.java    License: MIT License 6 votes vote down vote up
public boolean hasField(ValueMember field)
{
    try {
        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getName().equals(field.name)) {
                if (fields[i].getSignature().equals(
                    ValueUtility.getSignature(field)))
                    return true;
            }
        }
    } catch (Exception exc) {
        // Ignore this; all we want to do is return false
        // Note that ValueUtility.getSignature can throw checked exceptions.
    }

    return false;
}
 
Example #14
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ValueUtility.java    License: MIT License 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #15
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: IIOPInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
private void skipCustomUsingFVD(ValueMember[] fields,
                                com.sun.org.omg.SendingContext.CodeBase sender)
                                throws InvalidClassException, StreamCorruptedException,
                                       ClassNotFoundException, IOException
{
    readFormatVersion();
    boolean calledDefaultWriteObject = readBoolean();

    if (calledDefaultWriteObject)
        throwAwayData(fields, sender);

    if (getStreamFormatVersion() == 2) {

        ((ValueInputStream)getOrbStream()).start_value();
        ((ValueInputStream)getOrbStream()).end_value();
    }
}
 
Example #16
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ObjectStreamClass.java    License: GNU General Public License v2.0 6 votes vote down vote up
public boolean hasField(ValueMember field)
{
    try {
        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getName().equals(field.name)) {
                if (fields[i].getSignature().equals(
                    ValueUtility.getSignature(field)))
                    return true;
            }
        }
    } catch (Exception exc) {
        // Ignore this; all we want to do is return false
        // Note that ValueUtility.getSignature can throw checked exceptions.
    }

    return false;
}
 
Example #17
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ValueUtility.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #18
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: IIOPInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
private void skipCustomUsingFVD(ValueMember[] fields,
                                com.sun.org.omg.SendingContext.CodeBase sender)
                                throws InvalidClassException, StreamCorruptedException,
                                       ClassNotFoundException, IOException
{
    readFormatVersion();
    boolean calledDefaultWriteObject = readBoolean();

    if (calledDefaultWriteObject)
        throwAwayData(fields, sender);

    if (getStreamFormatVersion() == 2) {

        ((ValueInputStream)getOrbStream()).start_value();
        ((ValueInputStream)getOrbStream()).end_value();
    }
}
 
Example #19
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ObjectStreamClass.java    License: GNU General Public License v2.0 6 votes vote down vote up
public boolean hasField(ValueMember field)
{
    try {
        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getName().equals(field.name)) {
                if (fields[i].getSignature().equals(
                    ValueUtility.getSignature(field)))
                    return true;
            }
        }
    } catch (Exception exc) {
        // Ignore this; all we want to do is return false
        // Note that ValueUtility.getSignature can throw checked exceptions.
    }

    return false;
}
 
Example #20
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ValueUtility.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #21
Source Project: openjdk-8-source   Author: keerath   File: ValueUtility.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #22
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: IIOPInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
private void skipCustomUsingFVD(ValueMember[] fields,
                                com.sun.org.omg.SendingContext.CodeBase sender)
                                throws InvalidClassException, StreamCorruptedException,
                                       ClassNotFoundException, IOException
{
    readFormatVersion();
    boolean calledDefaultWriteObject = readBoolean();

    if (calledDefaultWriteObject)
        throwAwayData(fields, sender);

    if (getStreamFormatVersion() == 2) {

        ((ValueInputStream)getOrbStream()).start_value();
        ((ValueInputStream)getOrbStream()).end_value();
    }
}
 
Example #23
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ObjectStreamClass.java    License: GNU General Public License v2.0 6 votes vote down vote up
public boolean hasField(ValueMember field)
{
    try {
        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getName().equals(field.name)) {
                if (fields[i].getSignature().equals(
                    ValueUtility.getSignature(field)))
                    return true;
            }
        }
    } catch (Exception exc) {
        // Ignore this; all we want to do is return false
        // Note that ValueUtility.getSignature can throw checked exceptions.
    }

    return false;
}
 
Example #24
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ValueUtility.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #25
Source Project: hottub   Author: dsrg-uoft   File: ObjectStreamClass.java    License: GNU General Public License v2.0 6 votes vote down vote up
public boolean hasField(ValueMember field)
{
    try {
        for (int i = 0; i < fields.length; i++) {
            if (fields[i].getName().equals(field.name)) {
                if (fields[i].getSignature().equals(
                    ValueUtility.getSignature(field)))
                    return true;
            }
        }
    } catch (Exception exc) {
        // Ignore this; all we want to do is return false
        // Note that ValueUtility.getSignature can throw checked exceptions.
    }

    return false;
}
 
Example #26
Source Project: hottub   Author: dsrg-uoft   File: ValueUtility.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static String getSignature(ValueMember member)
    throws ClassNotFoundException {

    // REVISIT.  Can the type be something that is
    // non-primitive yet not a value_box, value, or objref?
    // If so, should use ObjectStreamClass or throw
    // exception.

    if (member.type.kind().value() == TCKind._tk_value_box ||
        member.type.kind().value() == TCKind._tk_value ||
        member.type.kind().value() == TCKind._tk_objref) {
        Class c = RepositoryId.cache.getId(member.id).getClassFromType();
        return ObjectStreamClass.getSignature(c);

    } else {

        return primitiveConstants[member.type.kind().value()];
    }

}
 
Example #27
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: TypeCodeImpl.java    License: Apache License 2.0 5 votes vote down vote up
public TypeCodeImpl(ORB orb,
                    int creationKind,
                    String id,
                    String name,
                    short type_modifier,
                    TypeCode concrete_base,
                    ValueMember[] members)
                    // for value types
{
    this(orb) ;

    if (creationKind == TCKind._tk_value) {
        _kind               = creationKind;
        setId(id);
        _name               = name;
        _type_modifier      = type_modifier;
        if (concrete_base != null) {
            _concrete_base = convertToNative(_orb, concrete_base);
        }
        _memberCount        = members.length;

        _memberNames = new String[_memberCount];
        _memberTypes = new TypeCodeImpl[_memberCount];
        _memberAccess = new short[_memberCount];

        for (int i = 0 ; i < _memberCount ; i++) {
            _memberNames[i] = members[i].name;
            _memberTypes[i] = convertToNative(_orb, members[i].type);
            _memberTypes[i].setParent(this);
            _memberAccess[i] = members[i].access;
        }
    } // else initializes to null
}
 
Example #28
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ObjectStreamClass_1_3_1.java    License: Apache License 2.0 5 votes vote down vote up
public boolean hasField(ValueMember field){

        for (int i = 0; i < fields.length; i++){
            try{
                if (fields[i].getName().equals(field.name)) {

                    if (fields[i].getSignature().equals(ValueUtility.getSignature(field)))
                        return true;
                }
            }
            catch(Throwable t){}
        }
        return false;
    }
 
Example #29
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBImpl.java    License: Apache License 2.0 5 votes vote down vote up
public synchronized org.omg.CORBA.TypeCode create_value_tc(String id,
                                              String name,
                                              short type_modifier,
                                              TypeCode concrete_base,
                                              ValueMember[] members)
{
    checkShutdownState();
    return new TypeCodeImpl(this, TCKind._tk_value, id, name,
                            type_modifier, concrete_base, members);
}
 
Example #30
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBSingleton.java    License: Apache License 2.0 5 votes vote down vote up
public org.omg.CORBA.TypeCode create_value_tc(String id,
                                              String name,
                                              short type_modifier,
                                              TypeCode concrete_base,
                                              ValueMember[] members)
{
    return new TypeCodeImpl(this, TCKind._tk_value, id, name,
                            type_modifier, concrete_base, members);
}