本文整理汇总了Java中gnu.CORBA.typecodes.GeneralTypeCode类的典型用法代码示例。如果您正苦于以下问题:Java GeneralTypeCode类的具体用法?Java GeneralTypeCode怎么用?Java GeneralTypeCode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GeneralTypeCode类属于gnu.CORBA.typecodes包,在下文中一共展示了GeneralTypeCode类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: create_value_box_tc
点赞 2
import gnu.CORBA.typecodes.GeneralTypeCode; //导入依赖的package包/类
/**
* Create value box typecode.
*/
public TypeCode create_value_box_tc(String id, String name,
TypeCode boxed_type
)
{
GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_value_box);
t.setName(name);
t.setId(id);
t.setContentType(boxed_type);
return t;
}
开发者ID:vilie,
项目名称:javify,
代码行数:14,
代码来源:ORB.java
示例2: type
点赞 2
import gnu.CORBA.typecodes.GeneralTypeCode; //导入依赖的package包/类
/**
* Creates and returns a new instance of the TypeCode, corresponding the CORBA
* <code>ObjectReferenceTemplate[]</code>. The length of the sequence is
* left with the initial value 0.
*/
public static TypeCode type()
{
GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_sequence);
t.setId(id());
t.setLength(0);
t.setContentType(ObjectReferenceTemplateHelper.type());
return t;
}
开发者ID:vilie,
项目名称:javify,
代码行数:14,
代码来源:ObjectReferenceTemplateSeqHelper.java
示例3: writeAny
点赞 2
import gnu.CORBA.typecodes.GeneralTypeCode; //导入依赖的package包/类
/**
* Write the passed java object to the output stream in the form of the CORBA
* {@link Any}. This includes creating an writing the object {@link TypeCode}
* first. Such Any can be later read by a non-RMI-IIOP CORBA implementation
* and manipulated, for instance, by means, provided in
* {@link org.omg.DynamicAny.DynAny}. Depending from the passed value, this
* method writes CORBA object, value type or value box. For value types Null
* is written with the abstract interface, its typecode having repository id
* "IDL:omg.org/CORBA/AbstractBase:1.0" and the empty string name.
*
* @param output the object to write.
* @param object the java object that must be written in the form of the CORBA
* {@link Any}.
*/
public void writeAny(OutputStream output, Object object)
{
Any any = output.orb().create_any();
if (object == null)
{
GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_abstract_interface);
t.setId("IDL:omg.org/CORBA/AbstractBase:1.0");
t.setName("");
any.type(t);
output.write_any(any);
return;
}
else if (object instanceof org.omg.CORBA.Object
&& !(object instanceof Remote))
{
// Write as value type.
boolean inserted = ObjectCreator.insertWithHelper(any, object);
if (inserted)
{
output.write_any(any);
return;
}
}
if (object instanceof org.omg.CORBA.Object)
writeAnyAsRemote(output, object);
else if (object instanceof Serializable)
{
any.insert_Value((Serializable) object);
output.write_any(any);
}
else
{
MARSHAL m = new MARSHAL(object.getClass().getName()
+ " must be CORBA Object, Remote or Serializable");
m.minor = Minor.NonSerializable;
throw m;
}
}
开发者ID:vilie,
项目名称:javify,
代码行数:54,
代码来源:UtilDelegateImpl.java
示例4: writeAnyAsRemote
点赞 2
import gnu.CORBA.typecodes.GeneralTypeCode; //导入依赖的package包/类
/**
* Write Any as for remote object.
*/
void writeAnyAsRemote(OutputStream output, Object object)
{
GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_objref);
t.setId(m_ValueHandler.getRMIRepositoryID(object.getClass()));
t.setName(object.getClass().getName());
// Writing Any (typecode, followed by value).
output.write_TypeCode(t);
writeRemoteObject(output, object);
}
开发者ID:vilie,
项目名称:javify,
代码行数:14,
代码来源:UtilDelegateImpl.java
示例5: writeAny
点赞 2
import gnu.CORBA.typecodes.GeneralTypeCode; //导入依赖的package包/类
/**
* Write the passed java object to the output stream in the form of the CORBA
* {@link Any}. This includes creating an writing the object {@link TypeCode}
* first. Such Any can be later read by a non-RMI-IIOP CORBA implementation
* and manipulated, for instance, by means, provided in
* {@link org.omg.DynamicAny.DynAny}. Depending from the passed value, this
* method writes CORBA object, value type or value box. For value types Null
* is written with the abstract interface, its typecode having repository id
* "IDL:omg.org/CORBA/AbstractBase:1.0" and the empty string name.
*
* @param output the object to write.
* @param object the java object that must be written in the form of the CORBA
* {@link Any}.
*/
public void writeAny(OutputStream output, Object object)
{
Any any = output.orb().create_any();
if (object == null)
{
GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_abstract_interface);
t.setId("IDL:omg.org/CORBA/AbstractBase:1.0");
t.setName("");
any.type(t);
output.write_any(any);
return;
}
else if (object instanceof org.omg.CORBA.Object
&& !(object instanceof Remote))
{
// Write as value type.
boolean inserted = ObjectCreator.insertWithHelper(any, object);
if (inserted)
{
output.write_any(any);
return;
}
}
if (object instanceof org.omg.CORBA.Object)
writeAnyAsRemote(output, object);
else if (object instanceof Serializable)
{
any.insert_Value((Serializable) object);
output.write_any(any);
}
else
{
MARSHAL m = new MARSHAL(object.getClass().getName()
+ " must be CORBA Object, Remote or Serializable");
m.minor = Minor.NonSerializable;
throw m;
}
}
开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:54,
代码来源:UtilDelegateImpl.java
示例6: create_abstract_interface_tc
点赞 1
import gnu.CORBA.typecodes.GeneralTypeCode; //导入依赖的package包/类
/**
* Create a typecode for an abstract interface. The abstract interface
* can be either CORBA object or CORBA value type.
*
* @param id the id of the abstract interface.
* @param name the name of the abstract interface.
*
* @return the created typecode.
*/
public TypeCode create_abstract_interface_tc(String id, String name)
{
GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_abstract_interface);
t.setName(name);
t.setId(id);
return t;
}
开发者ID:vilie,
项目名称:javify,
代码行数:17,
代码来源:ORB.java
示例7: create_native_tc
点赞 1
import gnu.CORBA.typecodes.GeneralTypeCode; //导入依赖的package包/类
/**
* Create a typecode for a native interface.
*
* @param id the id of the native interface.
* @param name the name of the native interface.
*
* @return the created typecode.
*/
public TypeCode create_native_tc(String id, String name)
{
GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_native);
t.setName(name);
t.setId(id);
return t;
}
开发者ID:vilie,
项目名称:javify,
代码行数:16,
代码来源:ORB.java