/** * Ref value extractor method * * @return Ref, the value of Term */ public Ref extract_Ref() throws java.lang.Exception { if ((tcV == null) && (RefV != null)) return RefV; if (tcV.equal(RefHelper.type())) return RefV; throw new java.lang.Exception(""); }
/** Ref value insertion method */ public void insert_Ref(Ref r) { RefV = r; if (r.isNewRef()) tag = com.ericsson.otp.erlang.OtpExternal.newRefTag; else tag = com.ericsson.otp.erlang.OtpExternal.refTag; tcV = RefHelper.type(); }
/** Writes the value of Term to a stream */ public void write_value(com.ericsson.otp.erlang.OtpOutputStream _os) throws java.lang.Exception { if ((tcV == null) && (ObjV != null)) _os.write_any(ObjV); // Type not generated by IC else { switch (tcV.kind().value()) { case TCKind._tk_octet: case TCKind._tk_char: case TCKind._tk_wchar: case TCKind._tk_short: case TCKind._tk_ushort: case TCKind._tk_long: case TCKind._tk_longlong: case TCKind._tk_ulong: case TCKind._tk_ulonglong: _os.write_long(longV); break; case TCKind._tk_float: _os.write_double(doubleV); break; case TCKind._tk_double: _os.write_double(doubleV); break; case TCKind._tk_boolean: _os.write_boolean(booleanV); break; case TCKind._tk_string: case TCKind._tk_wstring: _os.write_string(stringV); break; case TCKind._tk_atom: _os.write_atom(stringV); break; case TCKind._tk_struct: if (isPid()) PidHelper.marshal(_os, PidV); else { if (isReference()) RefHelper.marshal(_os, RefV); else { if (isPort()) PortHelper.marshal(_os, PortV); else _os.write(os.toByteArray()); } } break; case TCKind._tk_union: case TCKind._tk_array: case TCKind._tk_sequence: case TCKind._tk_enum: _os.write(os.toByteArray()); break; case TCKind._tk_void: _os.write_atom("ok"); break; /* * Not supported types */ default: throw new java.lang.Exception("BAD KIND"); } } }