Java Code Examples for com.sun.tools.corba.se.idl.ValueEntry#isSafe()

The following examples show how to use com.sun.tools.corba.se.idl.ValueEntry#isSafe() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ValueGen.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static String getValueModifier (ValueEntry vt)
{
  String mod = "NONE";
  if (vt.isCustom ())
    mod = "CUSTOM";
  else if (vt.isAbstract ())
    mod = "ABSTRACT";
  else if (vt.isSafe ())
    mod = "TRUNCATABLE";
  return "org.omg.CORBA.VM_" + mod + ".value";
}
 
Example 2
Source File: ValueGen.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private static String getValueModifier (ValueEntry vt)
{
  String mod = "NONE";
  if (vt.isCustom ())
    mod = "CUSTOM";
  else if (vt.isAbstract ())
    mod = "ABSTRACT";
  else if (vt.isSafe ())
    mod = "TRUNCATABLE";
  return "org.omg.CORBA.VM_" + mod + ".value";
}
 
Example 3
Source File: ValueGen24.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <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 ();
  }
}
 
Example 4
Source File: Helper.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Generate the instance variables.
 **/
protected void writeInstVars ()
{
  stream.println ("  private static String  _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";");
  if (entry instanceof ValueEntry)
  {
    stream.println ();
    stream.println ("  private static " + helperClass + " helper = new " + helperClass + " ();");
    stream.println ();
    stream.println ("  private static String[] _truncatable_ids = {");
    stream.print   ("    _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 = (ValueEntry) entry;
    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 ();
}
 
Example 5
Source File: ValueGen.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static String getValueModifier (ValueEntry vt)
{
  String mod = "NONE";
  if (vt.isCustom ())
    mod = "CUSTOM";
  else if (vt.isAbstract ())
    mod = "ABSTRACT";
  else if (vt.isSafe ())
    mod = "TRUNCATABLE";
  return "org.omg.CORBA.VM_" + mod + ".value";
}
 
Example 6
Source File: ValueGen24.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <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 ();
  }
}
 
Example 7
Source File: Helper.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Generate the instance variables.
 **/
protected void writeInstVars ()
{
  stream.println ("  private static String  _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";");
  if (entry instanceof ValueEntry)
  {
    stream.println ();
    stream.println ("  private static " + helperClass + " helper = new " + helperClass + " ();");
    stream.println ();
    stream.println ("  private static String[] _truncatable_ids = {");
    stream.print   ("    _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 = (ValueEntry) entry;
    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 ();
}
 
Example 8
Source File: ValueGen.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static String getValueModifier (ValueEntry vt)
{
  String mod = "NONE";
  if (vt.isCustom ())
    mod = "CUSTOM";
  else if (vt.isAbstract ())
    mod = "ABSTRACT";
  else if (vt.isSafe ())
    mod = "TRUNCATABLE";
  return "org.omg.CORBA.VM_" + mod + ".value";
}
 
Example 9
Source File: ValueGen24.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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 ();
  }
}
 
Example 10
Source File: Helper.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Generate the instance variables.
 **/
protected void writeInstVars ()
{
  stream.println ("  private static String  _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";");
  if (entry instanceof ValueEntry)
  {
    stream.println ();
    stream.println ("  private static " + helperClass + " helper = new " + helperClass + " ();");
    stream.println ();
    stream.println ("  private static String[] _truncatable_ids = {");
    stream.print   ("    _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 = (ValueEntry) entry;
    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 ();
}
 
Example 11
Source File: Helper.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Generate the instance variables.
 **/
protected void writeInstVars ()
{
  stream.println ("  private static String  _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";");
  if (entry instanceof ValueEntry)
  {
    stream.println ();
    stream.println ("  private static " + helperClass + " helper = new " + helperClass + " ();");
    stream.println ();
    stream.println ("  private static String[] _truncatable_ids = {");
    stream.print   ("    _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 = (ValueEntry) entry;
    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 ();
}
 
Example 12
Source File: ValueGen24.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <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 ();
  }
}
 
Example 13
Source File: Helper.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Generate the instance variables.
 **/
protected void writeInstVars ()
{
  stream.println ("  private static String  _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";");
  if (entry instanceof ValueEntry)
  {
    stream.println ();
    stream.println ("  private static " + helperClass + " helper = new " + helperClass + " ();");
    stream.println ();
    stream.println ("  private static String[] _truncatable_ids = {");
    stream.print   ("    _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 = (ValueEntry) entry;
    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 ();
}
 
Example 14
Source File: Helper.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Generate the instance variables.
 **/
protected void writeInstVars ()
{
  stream.println ("  private static String  _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";");
  if (entry instanceof ValueEntry)
  {
    stream.println ();
    stream.println ("  private static " + helperClass + " helper = new " + helperClass + " ();");
    stream.println ();
    stream.println ("  private static String[] _truncatable_ids = {");
    stream.print   ("    _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 = (ValueEntry) entry;
    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 ();
}
 
Example 15
Source File: ValueGen24.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <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 ();
  }
}
 
Example 16
Source File: Helper.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Generate the instance variables.
 **/
protected void writeInstVars ()
{
  stream.println ("  private static String  _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";");
  if (entry instanceof ValueEntry)
  {
    stream.println ();
    stream.println ("  private static " + helperClass + " helper = new " + helperClass + " ();");
    stream.println ();
    stream.println ("  private static String[] _truncatable_ids = {");
    stream.print   ("    _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 = (ValueEntry) entry;
    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 ();
}
 
Example 17
Source File: ValueGen.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static String getValueModifier (ValueEntry vt)
{
  String mod = "NONE";
  if (vt.isCustom ())
    mod = "CUSTOM";
  else if (vt.isAbstract ())
    mod = "ABSTRACT";
  else if (vt.isSafe ())
    mod = "TRUNCATABLE";
  return "org.omg.CORBA.VM_" + mod + ".value";
}
 
Example 18
Source File: ValueGen24.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <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 ();
  }
}
 
Example 19
Source File: Helper.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Generate the instance variables.
 **/
protected void writeInstVars ()
{
  stream.println ("  private static String  _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";");
  if (entry instanceof ValueEntry)
  {
    stream.println ();
    stream.println ("  private static " + helperClass + " helper = new " + helperClass + " ();");
    stream.println ();
    stream.println ("  private static String[] _truncatable_ids = {");
    stream.print   ("    _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 = (ValueEntry) entry;
    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 ();
}
 
Example 20
Source File: ValueGen.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static String getValueModifier (ValueEntry vt)
{
  String mod = "NONE";
  if (vt.isCustom ())
    mod = "CUSTOM";
  else if (vt.isAbstract ())
    mod = "ABSTRACT";
  else if (vt.isSafe ())
    mod = "TRUNCATABLE";
  return "org.omg.CORBA.VM_" + mod + ".value";
}