Java Code Examples for org.omg.CORBA.TCKind._tk_string
The following are Jave code examples for showing how to use
_tk_string of the
org.omg.CORBA.TCKind
class.
You can vote up the examples you like. Your votes will be used in our system to get
more good examples.
+ Save this method
Example 1
Project: OpenJSharp File: DynAnyBasicImpl.java View Source Code | 6 votes |
public void insert_string(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_string) 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_string(value); }
Example 2
Project: openjdk-jdk10 File: DynAnyBasicImpl.java View Source Code | 6 votes |
public void insert_string(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_string) 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_string(value); }
Example 3
Project: OpenJSharp File: TypeCodeImpl.java View Source Code | 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 4
Project: OpenJSharp File: TypeCodeImpl.java View Source Code | 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 5
Project: OpenJSharp File: TypeCodeImpl.java View Source Code | 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 6
Project: OpenJSharp File: DynAnyBasicImpl.java View Source Code | 5 votes |
public String get_string() 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_string) throw new TypeMismatch(); return any.extract_string(); }
Example 7
Project: openjdk-jdk10 File: TypeCodeImpl.java View Source Code | 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 8
Project: openjdk-jdk10 File: TypeCodeImpl.java View Source Code | 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 9
Project: openjdk-jdk10 File: TypeCodeImpl.java View Source Code | 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
Project: openjdk-jdk10 File: DynAnyBasicImpl.java View Source Code | 5 votes |
public String get_string() 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_string) throw new TypeMismatch(); return any.extract_string(); }
Example 11
Project: OpenJSharp File: ORB.java View Source Code | 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 12
Project: OpenJSharp File: ORBSingleton.java View Source Code | 4 votes |
public TypeCode create_string_tc(int bound) { return new TypeCodeImpl(this, TCKind._tk_string, bound); }
Example 13
Project: openjdk-jdk10 File: ORB.java View Source Code | 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 14
Project: openjdk-jdk10 File: ORBSingleton.java View Source Code | 4 votes |
public TypeCode create_string_tc(int bound) { return new TypeCodeImpl(this, TCKind._tk_string, bound); }
Example 15
Project: OpenJSharp File: ORBImpl.java View Source Code | 2 votes |
/** * Create a TypeCode for a string. * * @param bound the bound for the string. * @return the requested TypeCode. */ public synchronized TypeCode create_string_tc(int bound) { checkShutdownState(); return new TypeCodeImpl(this, TCKind._tk_string, bound); }
Example 16
Project: openjdk-jdk10 File: ORBImpl.java View Source Code | 2 votes |
/** * Create a TypeCode for a string. * * @param bound the bound for the string. * @return the requested TypeCode. */ public synchronized TypeCode create_string_tc(int bound) { checkShutdownState(); return new TypeCodeImpl(this, TCKind._tk_string, bound); }