• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ValueEntry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.tools.corba.se.idl.ValueEntry的典型用法代码示例。如果您正苦于以下问题:Java ValueEntry类的具体用法?Java ValueEntry怎么用?Java ValueEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ValueEntry类属于com.sun.tools.corba.se.idl包,在下文中一共展示了ValueEntry类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: streamableRead

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的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: generate

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * <62023> - generate factory interface and default factory
 **/
public void generate (Hashtable symbolTable, ValueEntry v, PrintWriter str)
{
  this.symbolTable = symbolTable;
  this.v = v;
  init ();

  openStream ();
  if (stream == null)
    return;
  generateTie ();
  generateHelper ();
  generateHolder ();
  if (!v.isAbstract ()) {
    generateValueFactory ();
    generateDefaultFactory ();
  }
  writeHeading ();
  writeBody ();
  writeClosing ();
  closeStream ();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:ValueGen24.java


示例3: generate

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 *
 **/
public void generate (Hashtable symbolTable, ValueEntry v, PrintWriter str)
{
  this.symbolTable = symbolTable;
  this.v = v;
  init ();

  openStream ();
  if (stream == null)
    return;
  generateTie ();
  generateHelper ();
  generateHolder ();
  writeHeading ();
  writeBody ();
  writeClosing ();
  closeStream ();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:ValueGen.java


示例4: javaQualifiedName

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * Given a symtabEntry, return the name of this entry. This
 * method does not do any conversions like javaName does.
 **/
public static String javaQualifiedName (SymtabEntry entry)
{
  String name = "";
  if (entry instanceof PrimitiveEntry)
    name = javaPrimName (entry.name ());
  else if (entry instanceof StringEntry)
    name = "String";
  else if (entry instanceof ValueEntry && entry.name ().equals ("ValueBase"))
    name = "java.io.Serializable";
  else
  {
    SymtabEntry container = entry.container ();
    if (container != null)
      name = container.name ();
    if (name.equals (""))
      name = entry.name ();
    else
      name = containerFullName (entry.container ()) + '.' + entry.name ();
  }
  return name.replace ('/', '.');
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:Util.java


示例5: init

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * Initialize members unique to this generator.
 **/
protected void init ()
{
  tie = ((Arguments)Compile.compiler.arguments).TIEServer ;
  poa = ((Arguments)Compile.compiler.arguments).POAServer ;

  skeletonNameModifier =
      ((Arguments)Compile.compiler.arguments).skeletonNameModifier ;
  tieNameModifier =
      ((Arguments)Compile.compiler.arguments).tieNameModifier ;

  tieClassName = tieNameModifier.makeName( i.name() ) ;
  skeletonClassName = skeletonNameModifier.makeName( i.name() ) ;

  intfName = Util.javaName (i);
  // for valuetype, get the name of the interface the valuetype supports
  if (i instanceof ValueEntry)
  {
    ValueEntry v = (ValueEntry) i;
    InterfaceEntry intf = (InterfaceEntry) v.supports ().elementAt (0);
    intfName = Util.javaName (intf);
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:Skeleton.java


示例6: write

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的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


示例7: writeHeading

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * Generate the heading, including package, imports, class statements,
 * and open curly.
 **/
protected void writeHeading ()
{
  Util.writePackage (stream, entry, Util.HelperFile);
  Util.writeProlog (stream, stream.name ());

  // Transfer comment to target <30jul1997daz>.
  if (entry.comment () != null)
    entry.comment ().generate ("", stream);

  stream.print ("public final class " + helperClass);
  if (entry instanceof ValueEntry)
    stream.println (" implements org.omg.CORBA.portable.ValueHelper");
  else
    stream.println ();
  stream.println ('{');
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:Helper.java


示例8: writeBody

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * Generate members of this class.
 **/
protected void writeBody ()
{
  writeInstVars ();
  writeCtors ();
  writeInsert ();
  writeExtract ();
  writeType ();
  writeID ();
  writeRead ();
  writeWrite ();
  if (entry instanceof InterfaceEntry && !(entry instanceof ValueEntry)) {
    writeNarrow ();
    writeUncheckedNarrow ();
  }
  writeHelperInterface ();
  if (entry instanceof ValueEntry)
    writeValueHelperInterface ();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:Helper.java


示例9: generate

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * d62023 - generate factory interface and default factory
 **/
public void generate (Hashtable symbolTable, ValueEntry v, PrintWriter str)
{
  this.symbolTable = symbolTable;
  this.v = v;
  init ();

  openStream ();
  if (stream == null)
    return;
  generateTie ();
  generateHelper ();
  generateHolder ();
  if (!v.isAbstract ()) {
    generateValueFactory ();
    generateDefaultFactory ();
  }
  writeHeading ();
  writeBody ();
  writeClosing ();
  closeStream ();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:25,代码来源:ValueGen24.java


示例10: writeTruncatable

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * <d62023> - Goes in mapped class, not Helper
 **/
protected void writeTruncatable () // <d60929>
{
  if (!v.isAbstract ()) {
     stream.println ("  private static String[] _truncatable_ids = {");
     stream.print   ("    " + Util.helperName(v, true) + ".id ()");

     // Any safe ValueEntry must have a concete value parent.
     // The topmost parent cannot be safe since it doesn't have
     // a concrete parent.
     ValueEntry child = v;
     while (child.isSafe ())
     {
      stream.println(",");
      ValueEntry parent = (ValueEntry)child.derivedFrom ().elementAt (0);
      stream.print("    \"" + Util.stripLeadingUnderscoresFromID (parent.repositoryID ().ID ()) + "\"");
      child = parent;
    }
    stream.println();
    stream.println("  };");
    stream.println();
    stream.println ("  public String[] _truncatable_ids() {");
    stream.println ("    return _truncatable_ids;");
    stream.println ("  }");
    stream.println ();
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:ValueGen24.java


示例11: read

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * <d62023> Call super._read()
 **/
public int read (int index, String indent, String name, SymtabEntry entry, PrintWriter stream)
{
  // First do the state members from concrete parent hierarchy
  Vector vParents = ((ValueEntry) entry).derivedFrom ();
  if (vParents != null && vParents.size() != 0)
  {
    ValueEntry parent = (ValueEntry) vParents.elementAt (0);
    if (parent == null)
      return index;

    // call super._read if non-abstract value parent
    if ((!parent.isAbstract ()) && (! Util.javaQualifiedName(parent).equals ("java.io.Serializable"))) // <d60929>
        stream.println(indent + "super._read (istream);");
  }

  Vector vMembers = ((ValueEntry) entry).state ();
  int noOfMembers = vMembers == null ? 0 : vMembers.size ();

  for (int k = 0; k < noOfMembers; k++)
  {
    TypedefEntry member = (TypedefEntry)((InterfaceState)vMembers.elementAt (k)).entry;
    String memberName = member.name ();
    SymtabEntry mType = member.type ();

    if (mType instanceof PrimitiveEntry ||
        mType instanceof TypedefEntry   ||
        mType instanceof SequenceEntry  ||
        mType instanceof StringEntry    ||
        !member.arrayInfo ().isEmpty ())
      index = ((JavaGenerator)member.generator ()).read (index, indent, name + '.' + memberName, member, stream);
    else
      stream.println (indent + name + '.' + memberName + " = " +
                      Util.helperName (mType, true) + ".read (istream);"); // <d61056>
  }

  return index;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:41,代码来源:ValueGen24.java


示例12: write

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * <d62023> Call super._write()
 **/
public int write (int index, String indent, String name, SymtabEntry entry, PrintWriter stream)
{
  // First do the state members from concrete parent hierarchy
  Vector vParents = ((ValueEntry)entry).derivedFrom ();
  if (vParents != null && vParents.size () != 0)
  {
    ValueEntry parent = (ValueEntry)vParents.elementAt (0);
    if (parent == null)
      return index;
    // call super._read if non-abstract value parent
    if ((!parent.isAbstract ()) && (! Util.javaQualifiedName(parent).equals ("java.io.Serializable"))) // <d60929>
        stream.println(indent + "super._write (ostream);");
  }

  Vector vMembers = ((ValueEntry) entry ).state ();
  int noOfMembers = vMembers == null ? 0 : vMembers.size ();
  for (int k = 0; k < noOfMembers; k++)
  {
    TypedefEntry member = (TypedefEntry)((InterfaceState)vMembers.elementAt (k)).entry;
    String memberName = member.name ();
    SymtabEntry mType = member.type ();

    if (mType instanceof PrimitiveEntry ||
        mType instanceof TypedefEntry   ||
        mType instanceof SequenceEntry  ||
        mType instanceof StringEntry    ||
        !member.arrayInfo ().isEmpty ())
      index = ((JavaGenerator)member.generator ()).write (index, indent, name + '.' + memberName, member, stream);
    else
      stream.println (indent + Util.helperName (mType, true) + // <d61056>
                            ".write (ostream, " + name + '.' + memberName + ");");
  }

  return index;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:ValueGen24.java


示例13: interfaceMethod

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 *
 **/
protected void interfaceMethod (Hashtable symbolTable, MethodEntry m, PrintWriter stream)
{
  this.symbolTable = symbolTable;
  this.m           = m;
  this.stream      = stream;
  if (m.comment () != null)
    m.comment ().generate ("", stream);
  stream.print ("  ");
  SymtabEntry container = (SymtabEntry)m.container ();
  boolean isAbstract = false;
  boolean valueContainer = false;
  if (container instanceof ValueEntry)
  {
    isAbstract = ((ValueEntry)container).isAbstract ();
    valueContainer = true;
  }
  if (valueContainer && !isAbstract)
    stream.print ("public ");
  writeMethodSignature ();
  if (valueContainer && !isAbstract)
  {
    stream.println ();
    stream.println ("  {");
    stream.println ("  }");
    stream.println ();
  }
  else
    stream.println (";");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:MethodGen.java


示例14: writeOutputStreamWrite

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 *
 **/
private void writeOutputStreamWrite (String indent, String oStream, String name, SymtabEntry type, PrintWriter stream)
{
  String typeName = type.name ();
  stream.print (indent);
  if (type instanceof PrimitiveEntry)
  {
    if (typeName.equals ("long long"))
      stream.println (oStream + ".write_longlong (" + name +");");
    else if (typeName.equals ("unsigned short"))
      stream.println (oStream + ".write_ushort (" + name + ");");
    else if (typeName.equals ("unsigned long"))
      stream.println (oStream + ".write_ulong (" + name + ");");
    else if (typeName.equals ("unsigned long long"))
      stream.println (oStream + ".write_ulonglong (" + name + ");");
    else
      stream.println (oStream + ".write_" + typeName + " (" + name + ");");
  }
  else if (type instanceof StringEntry)
    stream.println (oStream + ".write_" + typeName + " (" + name + ");");
  else if (type instanceof SequenceEntry)
    stream.println (oStream + ".write_" + type.type().name() + " (" + name + ");");
  else if (type instanceof ValueBoxEntry)
  {
    ValueBoxEntry v = (ValueBoxEntry) type;
    TypedefEntry member = ((InterfaceState) v.state ().elementAt (0)).entry;
    SymtabEntry mType = member.type ();

    // if write value to the boxed holder indicated by the name ending with ".value"
    if (mType instanceof PrimitiveEntry && name.endsWith (".value"))
      stream.println (Util.helperName (type, true) + ".write (" + oStream + ", "  // <d61056>
      + " new " + Util.javaQualifiedName (type) + " (" + name + "));"); //<d60929>
    else
      stream.println (Util.helperName (type, true) + ".write (" + oStream + ", " + name + ");"); //<d60929> // <d61056>
  }
  else if (type instanceof ValueEntry)
      stream.println (Util.helperName (type, true) + ".write (" + oStream + ", " + name + ");"); //<d60929> // <d61056>
  else
    stream.println (Util.helperName (type, true) + ".write (" + oStream + ", " + name + ");"); // <d61056>
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:43,代码来源:MethodGen.java


示例15: hasFactoryMethods

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * @return true if entry has any factory methods declared
 **/
protected boolean hasFactoryMethods ()
{
  Vector init = ((ValueEntry)entry).initializers ();
  if (init != null && init.size () > 0)
    return true;
  else
    return false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:DefaultFactory.java


示例16: writeFactoryMethods

import com.sun.tools.corba.se.idl.ValueEntry; //导入依赖的package包/类
/**
 * Generate members of this class.
 **/
protected void writeFactoryMethods ()
{
  Vector init = ((ValueEntry)entry).initializers ();
  if (init != null)
  {
    for (int i = 0; i < init.size (); i++)
    {
      MethodEntry element = (MethodEntry) init.elementAt (i);
      element.valueMethod (true); //tag value method if not tagged previously
      ((MethodGen24) element.generator ()).defaultFactoryMethod (symbolTable, element, stream);
    }
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:DefaultFactory.java



注:本文中的com.sun.tools.corba.se.idl.ValueEntry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ValueBoxEntry类代码示例发布时间:2022-05-22
下一篇:
Java HSClientProtocolPB类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap