Java Code Examples for org.omg.CORBA.TCKind#_tk_array
The following examples show how to use
org.omg.CORBA.TCKind#_tk_array .
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 openjdk-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-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 3
Source File: TypeCodeImpl.java From jdk8u60 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 | 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 5
Source File: TypeCodeImpl.java From jdk8u60 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 6
Source File: TypeCodeImpl.java From openjdk-jdk8u-backup 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 7
Source File: DynAnyUtil.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
static boolean isConstructedDynAny(DynAny dynAny) { // DynFixed is constructed but not a subclass of DynAnyConstructedImpl //return (dynAny instanceof DynAnyConstructedImpl); int kind = dynAny.type().kind().value(); return (kind == TCKind._tk_sequence || kind == TCKind._tk_struct || kind == TCKind._tk_array || kind == TCKind._tk_union || kind == TCKind._tk_enum || kind == TCKind._tk_fixed || kind == TCKind._tk_value || kind == TCKind._tk_value_box); }
Example 8
Source File: DynAnyUtil.java From hottub with GNU General Public License v2.0 | 5 votes |
static boolean isConstructedDynAny(DynAny dynAny) { // DynFixed is constructed but not a subclass of DynAnyConstructedImpl //return (dynAny instanceof DynAnyConstructedImpl); int kind = dynAny.type().kind().value(); return (kind == TCKind._tk_sequence || kind == TCKind._tk_struct || kind == TCKind._tk_array || kind == TCKind._tk_union || kind == TCKind._tk_enum || kind == TCKind._tk_fixed || kind == TCKind._tk_value || kind == TCKind._tk_value_box); }
Example 9
Source File: DynAnyUtil.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
static boolean isConstructedDynAny(DynAny dynAny) { // DynFixed is constructed but not a subclass of DynAnyConstructedImpl //return (dynAny instanceof DynAnyConstructedImpl); int kind = dynAny.type().kind().value(); return (kind == TCKind._tk_sequence || kind == TCKind._tk_struct || kind == TCKind._tk_array || kind == TCKind._tk_union || kind == TCKind._tk_enum || kind == TCKind._tk_fixed || kind == TCKind._tk_value || kind == TCKind._tk_value_box); }
Example 10
Source File: DynAnyUtil.java From openjdk-jdk8u-backup 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 11
Source File: DynAnyUtil.java From hottub with GNU General Public License v2.0 | 5 votes |
static DynAny createMostDerivedDynAny(Any any, ORB orb, boolean copyValue) throws org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode { if (any == null || ! DynAnyUtil.isConsistentType(any.type())) throw new org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode(); switch (any.type().kind().value()) { case TCKind._tk_sequence: return new DynSequenceImpl(orb, any, copyValue); case TCKind._tk_struct: return new DynStructImpl(orb, any, copyValue); case TCKind._tk_array: return new DynArrayImpl(orb, any, copyValue); case TCKind._tk_union: return new DynUnionImpl(orb, any, copyValue); case TCKind._tk_enum: return new DynEnumImpl(orb, any, copyValue); case TCKind._tk_fixed: return new DynFixedImpl(orb, any, copyValue); case TCKind._tk_value: return new DynValueImpl(orb, any, copyValue); case TCKind._tk_value_box: return new DynValueBoxImpl(orb, any, copyValue); default: return new DynAnyBasicImpl(orb, any, copyValue); } }
Example 12
Source File: TypeCodeImpl.java From openjdk-jdk8u 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 13
Source File: DynAnyUtil.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
static boolean isConstructedDynAny(DynAny dynAny) { // DynFixed is constructed but not a subclass of DynAnyConstructedImpl //return (dynAny instanceof DynAnyConstructedImpl); int kind = dynAny.type().kind().value(); return (kind == TCKind._tk_sequence || kind == TCKind._tk_struct || kind == TCKind._tk_array || kind == TCKind._tk_union || kind == TCKind._tk_enum || kind == TCKind._tk_fixed || kind == TCKind._tk_value || kind == TCKind._tk_value_box); }
Example 14
Source File: TypeCodeImpl.java From openjdk-jdk9 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 15
Source File: TypeCodeImpl.java From TencentKona-8 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 16
Source File: ORBSingleton.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
public TypeCode create_array_tc(int length, TypeCode element_type) { return new TypeCodeImpl(this, TCKind._tk_array, length, element_type); }
Example 17
Source File: ORBSingleton.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public TypeCode create_array_tc(int length, TypeCode element_type) { return new TypeCodeImpl(this, TCKind._tk_array, length, element_type); }
Example 18
Source File: CorbaHandlerUtils.java From cxf with Apache License 2.0 | 4 votes |
public static CorbaTypeListener getTypeListener(QName name, QName idlType, CorbaTypeMap typeMap, ORB orb, ServiceInfo serviceInfo) throws CorbaBindingException { CorbaObjectHandler handler = null; TypeCode tc = CorbaUtils.getTypeCode(orb, idlType, typeMap); try { while (tc.kind().value() == TCKind._tk_alias) { Alias alias = (Alias) CorbaUtils.getCorbaType(idlType, typeMap); if (alias == null) { throw new CorbaBindingException("Couldn't find corba alias type: " + idlType); } tc = tc.content_type(); idlType = alias.getBasetype(); } } catch (Throwable ex) { throw new CorbaBindingException(ex); } CorbaTypeListener result = null; if (CorbaUtils.isPrimitiveIdlType(idlType)) { handler = new CorbaPrimitiveHandler(name, idlType, tc, null); result = new CorbaPrimitiveListener(handler); } else { CorbaType type = CorbaUtils.getCorbaType(idlType, typeMap); switch (tc.kind().value()) { case TCKind._tk_any: handler = new CorbaAnyHandler(name, idlType, tc, type); ((CorbaAnyHandler)handler).setTypeMap(typeMap); result = new CorbaAnyListener(handler, typeMap, orb, serviceInfo); break; case TCKind._tk_array: handler = new CorbaArrayHandler(name, idlType, tc, type); result = new CorbaArrayListener(handler, typeMap, orb, serviceInfo); break; case TCKind._tk_enum: handler = new CorbaEnumHandler(name, idlType, tc, type); result = new CorbaEnumListener(handler); break; case TCKind._tk_except: handler = new CorbaExceptionHandler(name, idlType, tc, type); result = new CorbaExceptionListener(handler, typeMap, orb, serviceInfo); break; case TCKind._tk_fixed: handler = new CorbaFixedHandler(name, idlType, tc, type); result = new CorbaFixedListener(handler); break; case TCKind._tk_sequence: if (isOctets(type)) { handler = new CorbaOctetSequenceHandler(name, idlType, tc, type); result = new CorbaOctetSequenceListener(handler); } else { handler = new CorbaSequenceHandler(name, idlType, tc, type); result = new CorbaSequenceListener(handler, typeMap, orb, serviceInfo); } break; case TCKind._tk_string: case TCKind._tk_wstring: // These can be handled just like regular strings handler = new CorbaPrimitiveHandler(name, idlType, tc, type); result = new CorbaPrimitiveListener(handler); break; case TCKind._tk_struct: handler = new CorbaStructHandler(name, idlType, tc, type); result = new CorbaStructListener(handler, typeMap, orb, serviceInfo); break; case TCKind._tk_union: handler = new CorbaUnionHandler(name, idlType, tc, type); result = new CorbaUnionListener(handler, typeMap, orb, serviceInfo); break; case TCKind._tk_objref: handler = new CorbaObjectReferenceHandler(name, idlType, tc, type); result = new CorbaObjectReferenceListener(handler, orb); break; default: throw new CorbaBindingException("Unsupported complex type " + idlType); } } return result; }
Example 19
Source File: ORBImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 3 votes |
/** * Create a TypeCode for an array. * * @param length the length of the array. * @param element_type * the type of elements of the array. * @return the requested TypeCode. */ public synchronized TypeCode create_array_tc(int length, TypeCode element_type) { checkShutdownState(); return new TypeCodeImpl(this, TCKind._tk_array, length, element_type); }
Example 20
Source File: ORBImpl.java From openjdk-8-source with GNU General Public License v2.0 | 3 votes |
/** * Create a TypeCode for an array. * * @param length the length of the array. * @param element_type * the type of elements of the array. * @return the requested TypeCode. */ public synchronized TypeCode create_array_tc(int length, TypeCode element_type) { checkShutdownState(); return new TypeCodeImpl(this, TCKind._tk_array, length, element_type); }