com.sun.org.omg.CORBA.AttributeDescription Java Examples
The following examples show how to use
com.sun.org.omg.CORBA.AttributeDescription.
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: ValueUtility.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }
Example #2
Source File: ValueUtility.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }
Example #3
Source File: ValueUtility.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }
Example #4
Source File: ValueUtility.java From JDKSourceCode1.8 with MIT License | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }
Example #5
Source File: ValueUtility.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }
Example #6
Source File: ValueUtility.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }
Example #7
Source File: ValueUtility.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }
Example #8
Source File: ValueUtility.java From hottub with GNU General Public License v2.0 | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }
Example #9
Source File: ValueUtility.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }
Example #10
Source File: ValueUtility.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public static FullValueDescription translate(ORB orb, ObjectStreamClass osc, ValueHandler vh){ // Create FullValueDescription FullValueDescription result = new FullValueDescription(); Class className = osc.forClass(); ValueHandlerImpl vhandler = (com.sun.corba.se.impl.io.ValueHandlerImpl) vh; String repId = vhandler.createForAnyType(className); // Set FVD name result.name = vhandler.getUnqualifiedName(repId); if (result.name == null) result.name = ""; // Set FVD id _REVISIT_ : Manglings result.id = vhandler.getRMIRepositoryID(className); if (result.id == null) result.id = ""; // Set FVD is_abstract result.is_abstract = ObjectStreamClassCorbaExt.isAbstractInterface(className); // Set FVD is_custom result.is_custom = osc.hasWriteObject() || osc.isExternalizable(); // Set FVD defined_in _REVISIT_ : Manglings result.defined_in = vhandler.getDefinedInId(repId); if (result.defined_in == null) result.defined_in = ""; // Set FVD version result.version = vhandler.getSerialVersionUID(repId); if (result.version == null) result.version = ""; // Skip FVD operations - N/A result.operations = new OperationDescription[0]; // Skip FVD attributed - N/A result.attributes = new AttributeDescription[0]; // Set FVD members // Maps classes to repositoryIDs strings. This is used to detect recursive types. IdentityKeyValueStack createdIDs = new IdentityKeyValueStack(); // Stores all types created for resolving indirect types at the end. result.members = translateMembers(orb, osc, vh, createdIDs); // Skip FVD initializers - N/A result.initializers = new Initializer[0]; Class interfaces[] = osc.forClass().getInterfaces(); int abstractCount = 0; // Skip FVD supported_interfaces result.supported_interfaces = new String[interfaces.length]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { result.supported_interfaces[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) abstractCount++; } // Skip FVD abstract_base_values - N/A result.abstract_base_values = new String[abstractCount]; for (int interfaceIndex = 0; interfaceIndex < interfaces.length; interfaceIndex++) { if ((!(java.rmi.Remote.class.isAssignableFrom(interfaces[interfaceIndex]))) || (!Modifier.isPublic(interfaces[interfaceIndex].getModifiers()))) result.abstract_base_values[interfaceIndex] = vhandler.createForAnyType(interfaces[interfaceIndex]); } result.is_truncatable = false; // Set FVD base_value Class superClass = osc.forClass().getSuperclass(); if (java.io.Serializable.class.isAssignableFrom(superClass)) result.base_value = vhandler.getRMIRepositoryID(superClass); else result.base_value = ""; // Set FVD type //result.type = createTypeCodeForClass(orb, osc.forClass()); result.type = orb.get_primitive_tc(TCKind.tk_value); //11638 return result; }