Java Code Examples for org.omg.CORBA.TCKind#_tk_wstring
The following examples show how to use
org.omg.CORBA.TCKind#_tk_wstring .
These examples are extracted from open source projects.
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: openjdk-jdk8u-backup File: DynAnyBasicImpl.java License: GNU General Public License v2.0 | 6 votes |
public void insert_wstring(String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_wstring) throw new TypeMismatch(); if (value == null) throw new InvalidValue(); // Throw InvalidValue if this is a bounded string and the length is exceeded try { if (any.type().length() > 0 && any.type().length() < value.length()) throw new InvalidValue(); } catch (BadKind bad) { // impossible } any.insert_wstring(value); }
Example 2
Source Project: jdk8u60 File: DynAnyBasicImpl.java License: GNU General Public License v2.0 | 6 votes |
public void insert_wstring(String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_wstring) throw new TypeMismatch(); if (value == null) throw new InvalidValue(); // Throw InvalidValue if this is a bounded string and the length is exceeded try { if (any.type().length() > 0 && any.type().length() < value.length()) throw new InvalidValue(); } catch (BadKind bad) { // impossible } any.insert_wstring(value); }
Example 3
Source Project: openjdk-jdk8u File: DynAnyBasicImpl.java License: GNU General Public License v2.0 | 6 votes |
public void insert_wstring(String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_wstring) throw new TypeMismatch(); if (value == null) throw new InvalidValue(); // Throw InvalidValue if this is a bounded string and the length is exceeded try { if (any.type().length() > 0 && any.type().length() < value.length()) throw new InvalidValue(); } catch (BadKind bad) { // impossible } any.insert_wstring(value); }
Example 4
Source Project: openjdk-8 File: DynAnyBasicImpl.java License: GNU General Public License v2.0 | 6 votes |
public void insert_wstring(String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_wstring) throw new TypeMismatch(); if (value == null) throw new InvalidValue(); // Throw InvalidValue if this is a bounded string and the length is exceeded try { if (any.type().length() > 0 && any.type().length() < value.length()) throw new InvalidValue(); } catch (BadKind bad) { // impossible } any.insert_wstring(value); }
Example 5
Source Project: jdk1.8-source-analysis File: TypeCodeImpl.java License: Apache License 2.0 | 5 votes |
public TypeCodeImpl(ORB orb, int creationKind) // for primitive types { this(orb); // private API. dont bother checking that // (creationKind < 0 || creationKind > typeTable.length) _kind = creationKind; // do initialization for special cases switch (_kind) { case TCKind._tk_objref: { // this is being used to create typecode for CORBA::Object setId("IDL:omg.org/CORBA/Object:1.0"); _name = "Object"; break; } case TCKind._tk_string: case TCKind._tk_wstring: { _length =0; break; } case TCKind._tk_value: { _concrete_base = null; break; } } }
Example 6
Source Project: openjdk-jdk8u File: TypeCodeImpl.java License: GNU General Public License v2.0 | 5 votes |
public TypeCodeImpl(ORB orb, int creationKind, int bound) // for strings { this(orb) ; if (bound < 0) throw wrapper.negativeBounds() ; if ((creationKind == TCKind._tk_string) || (creationKind == TCKind._tk_wstring)) { _kind = creationKind; _length = bound; } // else initializes to null }
Example 7
Source Project: jdk1.8-source-analysis File: TypeCodeImpl.java License: Apache License 2.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 8
Source Project: openjdk-8 File: DynAnyBasicImpl.java License: GNU General Public License v2.0 | 5 votes |
public String get_wstring() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_wstring) throw new TypeMismatch(); return any.extract_wstring(); }
Example 9
Source Project: openjdk-8 File: TypeCodeImpl.java License: 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 10
Source Project: openjdk-jdk8u-backup File: DynAnyBasicImpl.java License: GNU General Public License v2.0 | 5 votes |
public String get_wstring() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_wstring) throw new TypeMismatch(); return any.extract_wstring(); }
Example 11
Source Project: openjdk-jdk9 File: DynAnyBasicImpl.java License: GNU General Public License v2.0 | 5 votes |
public String get_wstring() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_wstring) throw new TypeMismatch(); return any.extract_wstring(); }
Example 12
Source Project: hottub File: TypeCodeImpl.java License: GNU General Public License v2.0 | 5 votes |
public TypeCodeImpl(ORB orb, int creationKind, int bound) // for strings { this(orb) ; if (bound < 0) throw wrapper.negativeBounds() ; if ((creationKind == TCKind._tk_string) || (creationKind == TCKind._tk_wstring)) { _kind = creationKind; _length = bound; } // else initializes to null }
Example 13
Source Project: openjdk-jdk9 File: TypeCodeImpl.java License: GNU General Public License v2.0 | 5 votes |
public TypeCodeImpl(ORB orb, int creationKind) // for primitive types { this(orb); // private API. dont bother checking that // (creationKind < 0 || creationKind > typeTable.length) _kind = creationKind; // do initialization for special cases switch (_kind) { case TCKind._tk_objref: { // this is being used to create typecode for CORBA::Object setId("IDL:omg.org/CORBA/Object:1.0"); _name = "Object"; break; } case TCKind._tk_string: case TCKind._tk_wstring: { _length =0; break; } case TCKind._tk_value: { _concrete_base = null; break; } } }
Example 14
Source Project: jdk1.8-source-analysis File: ORB.java License: Apache License 2.0 | 4 votes |
protected ORB() { // Initialize logging first, since it is needed nearly // everywhere (for example, in TypeCodeImpl). wrapperMap = new ConcurrentHashMap(); wrapper = ORBUtilSystemException.get( this, CORBALogDomains.RPC_PRESENTATION ) ; omgWrapper = OMGSystemException.get( this, CORBALogDomains.RPC_PRESENTATION ) ; typeCodeMap = new HashMap(); primitiveTypeCodeConstants = new TypeCodeImpl[] { new TypeCodeImpl(this, TCKind._tk_null), new TypeCodeImpl(this, TCKind._tk_void), new TypeCodeImpl(this, TCKind._tk_short), new TypeCodeImpl(this, TCKind._tk_long), new TypeCodeImpl(this, TCKind._tk_ushort), new TypeCodeImpl(this, TCKind._tk_ulong), new TypeCodeImpl(this, TCKind._tk_float), new TypeCodeImpl(this, TCKind._tk_double), new TypeCodeImpl(this, TCKind._tk_boolean), new TypeCodeImpl(this, TCKind._tk_char), new TypeCodeImpl(this, TCKind._tk_octet), new TypeCodeImpl(this, TCKind._tk_any), new TypeCodeImpl(this, TCKind._tk_TypeCode), new TypeCodeImpl(this, TCKind._tk_Principal), new TypeCodeImpl(this, TCKind._tk_objref), null, // tk_struct null, // tk_union null, // tk_enum new TypeCodeImpl(this, TCKind._tk_string), null, // tk_sequence null, // tk_array null, // tk_alias null, // tk_except new TypeCodeImpl(this, TCKind._tk_longlong), new TypeCodeImpl(this, TCKind._tk_ulonglong), new TypeCodeImpl(this, TCKind._tk_longdouble), new TypeCodeImpl(this, TCKind._tk_wchar), new TypeCodeImpl(this, TCKind._tk_wstring), new TypeCodeImpl(this, TCKind._tk_fixed), new TypeCodeImpl(this, TCKind._tk_value), new TypeCodeImpl(this, TCKind._tk_value_box), new TypeCodeImpl(this, TCKind._tk_native), new TypeCodeImpl(this, TCKind._tk_abstract_interface) } ; monitoringManager = MonitoringFactories.getMonitoringManagerFactory( ). createMonitoringManager( MonitoringConstants.DEFAULT_MONITORING_ROOT, MonitoringConstants.DEFAULT_MONITORING_ROOT_DESCRIPTION); }
Example 15
Source Project: JDKSourceCode1.8 File: ORB.java License: MIT License | 4 votes |
protected ORB() { // Initialize logging first, since it is needed nearly // everywhere (for example, in TypeCodeImpl). wrapperMap = new ConcurrentHashMap(); wrapper = ORBUtilSystemException.get( this, CORBALogDomains.RPC_PRESENTATION ) ; omgWrapper = OMGSystemException.get( this, CORBALogDomains.RPC_PRESENTATION ) ; typeCodeMap = new HashMap(); primitiveTypeCodeConstants = new TypeCodeImpl[] { new TypeCodeImpl(this, TCKind._tk_null), new TypeCodeImpl(this, TCKind._tk_void), new TypeCodeImpl(this, TCKind._tk_short), new TypeCodeImpl(this, TCKind._tk_long), new TypeCodeImpl(this, TCKind._tk_ushort), new TypeCodeImpl(this, TCKind._tk_ulong), new TypeCodeImpl(this, TCKind._tk_float), new TypeCodeImpl(this, TCKind._tk_double), new TypeCodeImpl(this, TCKind._tk_boolean), new TypeCodeImpl(this, TCKind._tk_char), new TypeCodeImpl(this, TCKind._tk_octet), new TypeCodeImpl(this, TCKind._tk_any), new TypeCodeImpl(this, TCKind._tk_TypeCode), new TypeCodeImpl(this, TCKind._tk_Principal), new TypeCodeImpl(this, TCKind._tk_objref), null, // tk_struct null, // tk_union null, // tk_enum new TypeCodeImpl(this, TCKind._tk_string), null, // tk_sequence null, // tk_array null, // tk_alias null, // tk_except new TypeCodeImpl(this, TCKind._tk_longlong), new TypeCodeImpl(this, TCKind._tk_ulonglong), new TypeCodeImpl(this, TCKind._tk_longdouble), new TypeCodeImpl(this, TCKind._tk_wchar), new TypeCodeImpl(this, TCKind._tk_wstring), new TypeCodeImpl(this, TCKind._tk_fixed), new TypeCodeImpl(this, TCKind._tk_value), new TypeCodeImpl(this, TCKind._tk_value_box), new TypeCodeImpl(this, TCKind._tk_native), new TypeCodeImpl(this, TCKind._tk_abstract_interface) } ; monitoringManager = MonitoringFactories.getMonitoringManagerFactory( ). createMonitoringManager( MonitoringConstants.DEFAULT_MONITORING_ROOT, MonitoringConstants.DEFAULT_MONITORING_ROOT_DESCRIPTION); }
Example 16
Source Project: jdk1.8-source-analysis File: ORBSingleton.java License: Apache License 2.0 | 4 votes |
public TypeCode create_wstring_tc(int bound) { return new TypeCodeImpl(this, TCKind._tk_wstring, bound); }
Example 17
Source Project: hottub File: ORB.java License: GNU General Public License v2.0 | 4 votes |
protected ORB() { // Initialize logging first, since it is needed nearly // everywhere (for example, in TypeCodeImpl). wrapperMap = new ConcurrentHashMap(); wrapper = ORBUtilSystemException.get( this, CORBALogDomains.RPC_PRESENTATION ) ; omgWrapper = OMGSystemException.get( this, CORBALogDomains.RPC_PRESENTATION ) ; typeCodeMap = new HashMap(); primitiveTypeCodeConstants = new TypeCodeImpl[] { new TypeCodeImpl(this, TCKind._tk_null), new TypeCodeImpl(this, TCKind._tk_void), new TypeCodeImpl(this, TCKind._tk_short), new TypeCodeImpl(this, TCKind._tk_long), new TypeCodeImpl(this, TCKind._tk_ushort), new TypeCodeImpl(this, TCKind._tk_ulong), new TypeCodeImpl(this, TCKind._tk_float), new TypeCodeImpl(this, TCKind._tk_double), new TypeCodeImpl(this, TCKind._tk_boolean), new TypeCodeImpl(this, TCKind._tk_char), new TypeCodeImpl(this, TCKind._tk_octet), new TypeCodeImpl(this, TCKind._tk_any), new TypeCodeImpl(this, TCKind._tk_TypeCode), new TypeCodeImpl(this, TCKind._tk_Principal), new TypeCodeImpl(this, TCKind._tk_objref), null, // tk_struct null, // tk_union null, // tk_enum new TypeCodeImpl(this, TCKind._tk_string), null, // tk_sequence null, // tk_array null, // tk_alias null, // tk_except new TypeCodeImpl(this, TCKind._tk_longlong), new TypeCodeImpl(this, TCKind._tk_ulonglong), new TypeCodeImpl(this, TCKind._tk_longdouble), new TypeCodeImpl(this, TCKind._tk_wchar), new TypeCodeImpl(this, TCKind._tk_wstring), new TypeCodeImpl(this, TCKind._tk_fixed), new TypeCodeImpl(this, TCKind._tk_value), new TypeCodeImpl(this, TCKind._tk_value_box), new TypeCodeImpl(this, TCKind._tk_native), new TypeCodeImpl(this, TCKind._tk_abstract_interface) } ; monitoringManager = MonitoringFactories.getMonitoringManagerFactory( ). createMonitoringManager( MonitoringConstants.DEFAULT_MONITORING_ROOT, MonitoringConstants.DEFAULT_MONITORING_ROOT_DESCRIPTION); }
Example 18
Source Project: openjdk-jdk8u-backup File: ORB.java License: GNU General Public License v2.0 | 4 votes |
protected ORB() { // Initialize logging first, since it is needed nearly // everywhere (for example, in TypeCodeImpl). wrapperMap = new ConcurrentHashMap(); wrapper = ORBUtilSystemException.get( this, CORBALogDomains.RPC_PRESENTATION ) ; omgWrapper = OMGSystemException.get( this, CORBALogDomains.RPC_PRESENTATION ) ; typeCodeMap = new HashMap(); primitiveTypeCodeConstants = new TypeCodeImpl[] { new TypeCodeImpl(this, TCKind._tk_null), new TypeCodeImpl(this, TCKind._tk_void), new TypeCodeImpl(this, TCKind._tk_short), new TypeCodeImpl(this, TCKind._tk_long), new TypeCodeImpl(this, TCKind._tk_ushort), new TypeCodeImpl(this, TCKind._tk_ulong), new TypeCodeImpl(this, TCKind._tk_float), new TypeCodeImpl(this, TCKind._tk_double), new TypeCodeImpl(this, TCKind._tk_boolean), new TypeCodeImpl(this, TCKind._tk_char), new TypeCodeImpl(this, TCKind._tk_octet), new TypeCodeImpl(this, TCKind._tk_any), new TypeCodeImpl(this, TCKind._tk_TypeCode), new TypeCodeImpl(this, TCKind._tk_Principal), new TypeCodeImpl(this, TCKind._tk_objref), null, // tk_struct null, // tk_union null, // tk_enum new TypeCodeImpl(this, TCKind._tk_string), null, // tk_sequence null, // tk_array null, // tk_alias null, // tk_except new TypeCodeImpl(this, TCKind._tk_longlong), new TypeCodeImpl(this, TCKind._tk_ulonglong), new TypeCodeImpl(this, TCKind._tk_longdouble), new TypeCodeImpl(this, TCKind._tk_wchar), new TypeCodeImpl(this, TCKind._tk_wstring), new TypeCodeImpl(this, TCKind._tk_fixed), new TypeCodeImpl(this, TCKind._tk_value), new TypeCodeImpl(this, TCKind._tk_value_box), new TypeCodeImpl(this, TCKind._tk_native), new TypeCodeImpl(this, TCKind._tk_abstract_interface) } ; monitoringManager = MonitoringFactories.getMonitoringManagerFactory( ). createMonitoringManager( MonitoringConstants.DEFAULT_MONITORING_ROOT, MonitoringConstants.DEFAULT_MONITORING_ROOT_DESCRIPTION); }
Example 19
Source Project: openjdk-jdk9 File: TypeCodeImpl.java License: 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 20
Source Project: jdk8u60 File: ORBImpl.java License: GNU General Public License v2.0 | 2 votes |
/** * Create a TypeCode for a wide string. * * @param bound the bound for the string. * @return the requested TypeCode. */ public synchronized TypeCode create_wstring_tc(int bound) { checkShutdownState(); return new TypeCodeImpl(this, TCKind._tk_wstring, bound); }