Java Code Examples for org.omg.CORBA.TCKind#_tk_sequence
The following examples show how to use
org.omg.CORBA.TCKind#_tk_sequence .
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: TypeCodeImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public TypeCode content_type() throws BadKind { switch (_kind) { case tk_indirect: return indirectType().content_type(); case TCKind._tk_sequence: return lazy_content_type(); case TCKind._tk_array: case TCKind._tk_alias: case TCKind._tk_value_box: return _contentType; default: throw new BadKind(); } }
Example 2
Source File: TypeCodeImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private TypeCodeImpl lazy_content_type() { if (_contentType == null) { if (_kind == TCKind._tk_sequence && _parentOffset > 0 && _parent != null) { // This is an unresolved recursive sequence tc. // Try to resolve it now if the hierarchy is complete. TypeCodeImpl realParent = getParentAtLevel(_parentOffset); if (realParent != null && realParent._id != null) { // Create a recursive type code object as the content type. // This is when the recursive sequence typecode morphes // into a sequence typecode containing a recursive typecode. _contentType = new TypeCodeImpl((ORB)_orb, realParent._id); } } } return _contentType; }
Example 3
Source File: TypeCodeImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public TypeCode content_type() throws BadKind { switch (_kind) { case tk_indirect: return indirectType().content_type(); case TCKind._tk_sequence: return lazy_content_type(); case TCKind._tk_array: case TCKind._tk_alias: case TCKind._tk_value_box: return _contentType; default: throw new BadKind(); } }
Example 4
Source File: TypeCodeImpl.java From JDKSourceCode1.8 with MIT License | 6 votes |
private TypeCodeImpl lazy_content_type() { if (_contentType == null) { if (_kind == TCKind._tk_sequence && _parentOffset > 0 && _parent != null) { // This is an unresolved recursive sequence tc. // Try to resolve it now if the hierarchy is complete. TypeCodeImpl realParent = getParentAtLevel(_parentOffset); if (realParent != null && realParent._id != null) { // Create a recursive type code object as the content type. // This is when the recursive sequence typecode morphes // into a sequence typecode containing a recursive typecode. _contentType = new TypeCodeImpl((ORB)_orb, realParent._id); } } } return _contentType; }
Example 5
Source File: TypeCodeImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private TypeCodeImpl lazy_content_type() { if (_contentType == null) { if (_kind == TCKind._tk_sequence && _parentOffset > 0 && _parent != null) { // This is an unresolved recursive sequence tc. // Try to resolve it now if the hierarchy is complete. TypeCodeImpl realParent = getParentAtLevel(_parentOffset); if (realParent != null && realParent._id != null) { // Create a recursive type code object as the content type. // This is when the recursive sequence typecode morphes // into a sequence typecode containing a recursive typecode. _contentType = new TypeCodeImpl((ORB)_orb, realParent._id); } } } return _contentType; }
Example 6
Source File: DynAnyUtil.java From JDKSourceCode1.8 with MIT License | 5 votes |
static DynAny createMostDerivedDynAny(TypeCode typeCode, ORB orb) throws org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode { if (typeCode == null || ! DynAnyUtil.isConsistentType(typeCode)) throw new org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode(); switch (typeCode.kind().value()) { case TCKind._tk_sequence: return new DynSequenceImpl(orb, typeCode); case TCKind._tk_struct: return new DynStructImpl(orb, typeCode); case TCKind._tk_array: return new DynArrayImpl(orb, typeCode); case TCKind._tk_union: return new DynUnionImpl(orb, typeCode); case TCKind._tk_enum: return new DynEnumImpl(orb, typeCode); case TCKind._tk_fixed: return new DynFixedImpl(orb, typeCode); case TCKind._tk_value: return new DynValueImpl(orb, typeCode); case TCKind._tk_value_box: return new DynValueBoxImpl(orb, typeCode); default: return new DynAnyBasicImpl(orb, typeCode); } }
Example 7
Source File: TypeCodeImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public TypeCodeImpl(ORB orb, int creationKind, int bound, TypeCode element_type) // for sequences and arrays { this(orb) ; if ( creationKind == TCKind._tk_sequence || creationKind == TCKind._tk_array ) { _kind = creationKind; _length = bound; _contentType = convertToNative(_orb, element_type); } // else initializes to null }
Example 8
Source File: TypeCodeImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public TypeCodeImpl(ORB orb, int creationKind, int bound, TypeCode element_type) // for sequences and arrays { this(orb) ; if ( creationKind == TCKind._tk_sequence || creationKind == TCKind._tk_array ) { _kind = creationKind; _length = bound; _contentType = convertToNative(_orb, element_type); } // else initializes to null }
Example 9
Source File: DynAnyUtil.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
static DynAny createMostDerivedDynAny(TypeCode typeCode, ORB orb) throws org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode { if (typeCode == null || ! DynAnyUtil.isConsistentType(typeCode)) throw new org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode(); switch (typeCode.kind().value()) { case TCKind._tk_sequence: return new DynSequenceImpl(orb, typeCode); case TCKind._tk_struct: return new DynStructImpl(orb, typeCode); case TCKind._tk_array: return new DynArrayImpl(orb, typeCode); case TCKind._tk_union: return new DynUnionImpl(orb, typeCode); case TCKind._tk_enum: return new DynEnumImpl(orb, typeCode); case TCKind._tk_fixed: return new DynFixedImpl(orb, typeCode); case TCKind._tk_value: return new DynValueImpl(orb, typeCode); case TCKind._tk_value_box: return new DynValueBoxImpl(orb, typeCode); default: return new DynAnyBasicImpl(orb, typeCode); } }
Example 10
Source File: TypeCodeImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
public TypeCodeImpl(ORB orb, int creationKind, int bound, int offset) // for recursive sequences { this(orb) ; if (creationKind == TCKind._tk_sequence) { _kind = creationKind; _length = bound; _parentOffset = offset; } // else initializes to null }
Example 11
Source File: CorbaHandlerUtils.java From cxf with Apache License 2.0 | 5 votes |
public static CorbaObjectHandler initializeObjectHandler(ORB orb, QName name, QName idlType, CorbaTypeMap typeMap, ServiceInfo serviceInfo, Map<QName, CorbaObjectHandler> seenTypes) { CorbaObjectHandler obj = createTypeHandler(orb, name, idlType, typeMap); if (!CorbaUtils.isPrimitiveIdlType(idlType)) { switch (obj.getTypeCode().kind().value()) { case TCKind._tk_any: ((CorbaAnyHandler)obj).setValue(orb.create_any()); break; case TCKind._tk_array: initializeArrayHandler(orb, obj, typeMap, serviceInfo, seenTypes); break; case TCKind._tk_except: initializeExceptionHandler(orb, obj, typeMap, serviceInfo, seenTypes); break; case TCKind._tk_sequence: if (!isOctets(obj.getType())) { initializeSequenceHandler(orb, obj, typeMap, serviceInfo, seenTypes); } break; case TCKind._tk_struct: initializeStructHandler(orb, obj, typeMap, serviceInfo, seenTypes); break; case TCKind._tk_union: initializeUnionHandler(orb, obj, typeMap, serviceInfo, seenTypes); break; default: //nothing to do, the Read/Write routines will throw exceptions } } return obj; }
Example 12
Source File: DynAnyUtil.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
static DynAny createMostDerivedDynAny(TypeCode typeCode, ORB orb) throws org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode { if (typeCode == null || ! DynAnyUtil.isConsistentType(typeCode)) throw new org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode(); switch (typeCode.kind().value()) { case TCKind._tk_sequence: return new DynSequenceImpl(orb, typeCode); case TCKind._tk_struct: return new DynStructImpl(orb, typeCode); case TCKind._tk_array: return new DynArrayImpl(orb, typeCode); case TCKind._tk_union: return new DynUnionImpl(orb, typeCode); case TCKind._tk_enum: return new DynEnumImpl(orb, typeCode); case TCKind._tk_fixed: return new DynFixedImpl(orb, typeCode); case TCKind._tk_value: return new DynValueImpl(orb, typeCode); case TCKind._tk_value_box: return new DynValueBoxImpl(orb, typeCode); default: return new DynAnyBasicImpl(orb, typeCode); } }
Example 13
Source File: TypeCodeImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public TypeCodeImpl(ORB orb, int creationKind, int bound, TypeCode element_type) // for sequences and arrays { this(orb) ; if ( creationKind == TCKind._tk_sequence || creationKind == TCKind._tk_array ) { _kind = creationKind; _length = bound; _contentType = convertToNative(_orb, element_type); } // else initializes to null }
Example 14
Source File: TypeCodeImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public int length() throws BadKind { switch (_kind) { case tk_indirect: return indirectType().length(); case TCKind._tk_string: case TCKind._tk_wstring: case TCKind._tk_sequence: case TCKind._tk_array: return _length; default: throw new BadKind(); } }
Example 15
Source File: TypeCodeImpl.java From JDKSourceCode1.8 with MIT License | 5 votes |
public TypeCodeImpl(ORB orb, int creationKind, int bound, int offset) // for recursive sequences { this(orb) ; if (creationKind == TCKind._tk_sequence) { _kind = creationKind; _length = bound; _parentOffset = offset; } // else initializes to null }
Example 16
Source File: TypeCodeImpl.java From hottub with GNU General Public License v2.0 | 4 votes |
private void printStream(PrintStream s, int level) { if (_kind == tk_indirect) { s.print("indirect " + _id); return; } switch (_kind) { case TCKind._tk_null: case TCKind._tk_void: case TCKind._tk_short: case TCKind._tk_long: case TCKind._tk_ushort: case TCKind._tk_ulong: case TCKind._tk_float: case TCKind._tk_double: case TCKind._tk_boolean: case TCKind._tk_char: case TCKind._tk_octet: case TCKind._tk_any: case TCKind._tk_TypeCode: case TCKind._tk_Principal: case TCKind._tk_objref: case TCKind._tk_longlong: case TCKind._tk_ulonglong: case TCKind._tk_longdouble: case TCKind._tk_wchar: case TCKind._tk_native: s.print(kindNames[_kind] + " " + _name); break; case TCKind._tk_struct: case TCKind._tk_except: case TCKind._tk_value: s.println(kindNames[_kind] + " " + _name + " = {"); for(int i=0; i<_memberCount; i++) { // memberName might differ from the name of the member. s.print(indent(level + 1)); if (_memberTypes[i] != null) _memberTypes[i].printStream(s, level + 1); else s.print("<unknown type>"); s.println(" " + _memberNames[i] + ";"); } s.print(indent(level) + "}"); break; case TCKind._tk_union: s.print("union " + _name + "..."); break; case TCKind._tk_enum: s.print("enum " + _name + "..."); break; case TCKind._tk_string: if (_length == 0) s.print("unbounded string " + _name); else s.print("bounded string(" + _length + ") " + _name); break; case TCKind._tk_sequence: case TCKind._tk_array: s.println(kindNames[_kind] + "[" + _length + "] " + _name + " = {"); s.print(indent(level + 1)); if (lazy_content_type() != null) { lazy_content_type().printStream(s, level + 1); } s.println(indent(level) + "}"); break; case TCKind._tk_alias: s.print("alias " + _name + " = " + (_contentType != null ? _contentType._name : "<unresolved>")); break; case TCKind._tk_wstring: s.print("wstring[" + _length + "] " + _name); break; case TCKind._tk_fixed: s.print("fixed(" + _digits + ", " + _scale + ") " + _name); break; case TCKind._tk_value_box: s.print("valueBox " + _name + "..."); break; case TCKind._tk_abstract_interface: s.print("abstractInterface " + _name + "..."); break; default: s.print("<unknown type>"); break; } }
Example 17
Source File: ORBSingleton.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public TypeCode create_sequence_tc(int bound, TypeCode element_type) { return new TypeCodeImpl(this, TCKind._tk_sequence, bound, element_type); }
Example 18
Source File: ORBSingleton.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public TypeCode create_sequence_tc(int bound, TypeCode element_type) { return new TypeCodeImpl(this, TCKind._tk_sequence, bound, element_type); }
Example 19
Source File: ORBImpl.java From TencentKona-8 with GNU General Public License v2.0 | 3 votes |
/** * Create a TypeCode for a sequence. * * @param bound the bound for the sequence. * @param element_type * the type of elements of the sequence. * @return the requested TypeCode. */ public synchronized TypeCode create_sequence_tc(int bound, TypeCode element_type) { checkShutdownState(); return new TypeCodeImpl(this, TCKind._tk_sequence, bound, element_type); }
Example 20
Source File: ORBImpl.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * Create a recursive TypeCode in a sequence. * * @param bound the bound for the sequence. * @param offset the index to the enclosing TypeCode that is * being referenced. * @return the requested TypeCode. */ public synchronized TypeCode create_recursive_sequence_tc(int bound, int offset) { checkShutdownState(); return new TypeCodeImpl(this, TCKind._tk_sequence, bound, offset); }