本文整理汇总了Java中com.sun.tools.corba.se.idl.InterfaceState类的典型用法代码示例。如果您正苦于以下问题:Java InterfaceState类的具体用法?Java InterfaceState怎么用?Java InterfaceState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InterfaceState类属于com.sun.tools.corba.se.idl包,在下文中一共展示了InterfaceState类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: streamableRead
import com.sun.tools.corba.se.idl.InterfaceState; //导入依赖的package包/类
protected void streamableRead (String entryName, SymtabEntry entry, PrintWriter stream)
{
Vector vMembers = ( (ValueBoxEntry) entry ).state ();
TypedefEntry member = ((InterfaceState) vMembers.elementAt (0)).entry;
SymtabEntry mType = member.type ();
if (mType instanceof PrimitiveEntry || mType instanceof SequenceEntry || mType instanceof TypedefEntry ||
mType instanceof StringEntry || !member.arrayInfo ().isEmpty ())
{
SymtabEntry mEntry = (SymtabEntry) ((InterfaceState) vMembers.elementAt (0)).entry;
((JavaGenerator)member.generator ()).read (0, " ", entryName + ".value", member, stream);
}
else if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry)
stream.println (" " + entryName + ".value = (" + Util.javaQualifiedName (mType) + ") ((org.omg.CORBA_2_3.portable.InputStream)istream).read_value (" + Util.helperName(mType, true) + ".get_instance ());"); // <d60929> // <d61056>
else
stream.println (" " + entryName + ".value = " + Util.helperName (mType, true) + ".read (istream);"); // <d61056>
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:ValueBoxGen.java
示例2: writeMembers
import com.sun.tools.corba.se.idl.InterfaceState; //导入依赖的package包/类
/**
* <d62023> - private state maps to protected, not default
**/
protected void writeMembers ()
{
// if the value type contains no data members, a null return is expected
if (v.state () == null)
return;
for (int i = 0; i < v.state ().size (); i ++)
{
InterfaceState member = (InterfaceState) v.state ().elementAt (i);
SymtabEntry entry = (SymtabEntry) member.entry;
Util.fillInfo (entry);
if (entry.comment () != null)
entry.comment ().generate (" ", stream);
String modifier = " ";
if (member.modifier == InterfaceState.Public)
modifier = " public ";
else
modifier = " protected ";
Util.writeInitializer (modifier, entry.name (), "", entry, stream);
}
stream.println();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:ValueGen24.java
示例3: writeMembers
import com.sun.tools.corba.se.idl.InterfaceState; //导入依赖的package包/类
/**
*
**/
protected void writeMembers ()
{
// if the value type contains no data members, a null return is expected
if (v.state () == null)
return;
for (int i = 0; i < v.state ().size (); i ++)
{
InterfaceState member = (InterfaceState) v.state ().elementAt (i);
SymtabEntry entry = (SymtabEntry) member.entry;
Util.fillInfo (entry);
if (entry.comment () != null)
entry.comment ().generate (" ", stream);
String modifier = " ";
if (member.modifier == InterfaceState.Public)
modifier = " public ";
Util.writeInitializer (modifier, entry.name (), "", entry, stream);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:ValueGen.java
示例4: writeBody
import com.sun.tools.corba.se.idl.InterfaceState; //导入依赖的package包/类
/**
*
**/
protected void writeBody ()
{
InterfaceState member = (InterfaceState) v.state ().elementAt (0);
SymtabEntry entry = (SymtabEntry) member.entry;
Util.fillInfo (entry);
if (entry.comment () != null)
entry.comment ().generate (" ", stream);
stream.println (" public " + Util.javaName (entry) + " value;");
stream.println (" public " + v.name () + " (" + Util.javaName (entry) + " initial)");
stream.println (" {");
stream.println (" value = initial;");
stream.println (" }");
stream.println ();
writeTruncatable (); // <d60929>
// writeStreamableMethods ();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:ValueBoxGen.java
示例5: write
import com.sun.tools.corba.se.idl.InterfaceState; //导入依赖的package包/类
public int write (int index, String indent, String name, SymtabEntry entry, PrintWriter stream)
{
Vector vMembers = ( (ValueEntry) entry ).state ();
TypedefEntry member = ((InterfaceState) vMembers.elementAt (0)).entry;
SymtabEntry mType = member.type ();
if (mType instanceof PrimitiveEntry || !member.arrayInfo ().isEmpty ())
index = ((JavaGenerator)member.generator ()).write (index, indent, name + ".value", member, stream);
else if (mType instanceof SequenceEntry || mType instanceof StringEntry || mType instanceof TypedefEntry || !member.arrayInfo ().isEmpty ())
index = ((JavaGenerator)member.generator ()).write (index, indent, name, member, stream);
else if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry)
stream.println (indent
+ "((org.omg.CORBA_2_3.portable.OutputStream)ostream).write_value ((java.io.Serializable) value, " // <d60929>
+ Util.helperName (mType, true) // <d61056>
+ ".get_instance ());"); // <d61056>
else
stream.println (indent + Util.helperName (mType, true) + ".write (ostream, " + name + ");"); // <d61056>
return index;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:ValueBoxGen.java
示例6: writeRead
import com.sun.tools.corba.se.idl.InterfaceState; //导入依赖的package包/类
/**
* Generate the _read method.
**/
protected void writeRead ()
{
stream.println (" public void _read (org.omg.CORBA.portable.InputStream i)");
stream.println (" {");
if (entry instanceof ValueBoxEntry)
{
TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;
SymtabEntry mType = member.type ();
if (mType instanceof StringEntry)
stream.println (" value = i.read_string ();");
else if (mType instanceof PrimitiveEntry)
stream.println (" value = " + helperClass + ".read (i).value;");
else
stream.println (" value = " + helperClass + ".read (i);");
}
else
stream.println (" value = " + helperClass + ".read (i);");
stream.println (" }");
stream.println ();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:Holder.java
示例7: init
import com.sun.tools.corba.se.idl.InterfaceState; //导入依赖的package包/类
/**
* Initialize variables unique to this generator.
**/
protected void init ()
{
helperClass = entry.name () + "Helper";
if (entry instanceof ValueBoxEntry)
{
ValueBoxEntry v = (ValueBoxEntry) entry;
TypedefEntry member = ((InterfaceState) v.state ().elementAt (0)).entry;
SymtabEntry mType = member.type ();
if (mType instanceof PrimitiveEntry)
helperType = Util.javaName (entry);
else
helperType = Util.javaName (mType);
}
else
helperType = Util.javaName (entry);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:Helper.java
示例8: writeMembers
import com.sun.tools.corba.se.idl.InterfaceState; //导入依赖的package包/类
/**
* d62023 - private state maps to protected, not default
**/
protected void writeMembers ()
{
// if the value type contains no data members, a null return is expected
if (v.state () == null)
return;
for (int i = 0; i < v.state ().size (); i ++)
{
InterfaceState member = (InterfaceState) v.state ().elementAt (i);
SymtabEntry entry = (SymtabEntry) member.entry;
Util.fillInfo (entry);
if (entry.comment () != null)
entry.comment ().generate (" ", stream);
String modifier = " ";
if (member.modifier == InterfaceState.Public)
modifier = " public ";
else
modifier = " protected ";
Util.writeInitializer (modifier, entry.name (), "", entry, stream);
}
stream.println();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:28,代码来源:ValueGen24.java
注:本文中的com.sun.tools.corba.se.idl.InterfaceState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论