Java Code Examples for com.sun.tools.corba.se.idl.MethodEntry#name()

The following examples show how to use com.sun.tools.corba.se.idl.MethodEntry#name() . 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: MethodGen24.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <d62023> Write the methodEntry for a valuetype factory method into
 *          the Value Helper class. Contents from email from Simon,
 *          4/25/99.
 **/
protected void helperFactoryMethod (Hashtable symbolTable, MethodEntry m, SymtabEntry t, PrintWriter stream)
{
  this.symbolTable = symbolTable;
  this.m = m;
  this.stream = stream;
  String initializerName = m.name ();
  String typeName = Util.javaName (t);
  String factoryName = typeName + "ValueFactory";

  // Step 1. Print factory method decl up to parms.
  stream.print  ("  public static " + typeName + " " + initializerName +
          " (org.omg.CORBA.ORB $orb");
  if (!m.parameters ().isEmpty ())
    stream.print (", "); // <d62794>

  // Step 2. Print the declaration parameter list.
  writeParmList (m, true, stream);

  // Step 3. Print the body of the factory method
  stream.println (")");
  stream.println ("  {");
  stream.println ("    try {");
  stream.println ("      " + factoryName + " $factory = (" + factoryName + ")");
  stream.println ("          ((org.omg.CORBA_2_3.ORB) $orb).lookup_value_factory(id());");
  stream.print   ("      return $factory." + initializerName + " (");
  writeParmList (m, false, stream);
  stream.println (");");
  stream.println ("    } catch (ClassCastException $ex) {");
  stream.println ("      throw new org.omg.CORBA.BAD_PARAM ();");
  stream.println ("    }");
  stream.println ("  }");
  stream.println ();
}
 
Example 2
Source File: MethodGen24.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <d62023> Write the methodEntry for a valuetype factory method into
 *          the Value Helper class. Contents from email from Simon,
 *          4/25/99.
 **/
protected void helperFactoryMethod (Hashtable symbolTable, MethodEntry m, SymtabEntry t, PrintWriter stream)
{
  this.symbolTable = symbolTable;
  this.m = m;
  this.stream = stream;
  String initializerName = m.name ();
  String typeName = Util.javaName (t);
  String factoryName = typeName + "ValueFactory";

  // Step 1. Print factory method decl up to parms.
  stream.print  ("  public static " + typeName + " " + initializerName +
          " (org.omg.CORBA.ORB $orb");
  if (!m.parameters ().isEmpty ())
    stream.print (", "); // <d62794>

  // Step 2. Print the declaration parameter list.
  writeParmList (m, true, stream);

  // Step 3. Print the body of the factory method
  stream.println (")");
  stream.println ("  {");
  stream.println ("    try {");
  stream.println ("      " + factoryName + " $factory = (" + factoryName + ")");
  stream.println ("          ((org.omg.CORBA_2_3.ORB) $orb).lookup_value_factory(id());");
  stream.print   ("      return $factory." + initializerName + " (");
  writeParmList (m, false, stream);
  stream.println (");");
  stream.println ("    } catch (ClassCastException $ex) {");
  stream.println ("      throw new org.omg.CORBA.BAD_PARAM ();");
  stream.println ("    }");
  stream.println ("  }");
  stream.println ();
}
 
Example 3
Source File: MethodGen24.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <d62023> Write the methodEntry for a valuetype factory method into
 *          the Value Helper class. Contents from email from Simon,
 *          4/25/99.
 **/
protected void helperFactoryMethod (Hashtable symbolTable, MethodEntry m, SymtabEntry t, PrintWriter stream)
{
  this.symbolTable = symbolTable;
  this.m = m;
  this.stream = stream;
  String initializerName = m.name ();
  String typeName = Util.javaName (t);
  String factoryName = typeName + "ValueFactory";

  // Step 1. Print factory method decl up to parms.
  stream.print  ("  public static " + typeName + " " + initializerName +
          " (org.omg.CORBA.ORB $orb");
  if (!m.parameters ().isEmpty ())
    stream.print (", "); // <d62794>

  // Step 2. Print the declaration parameter list.
  writeParmList (m, true, stream);

  // Step 3. Print the body of the factory method
  stream.println (")");
  stream.println ("  {");
  stream.println ("    try {");
  stream.println ("      " + factoryName + " $factory = (" + factoryName + ")");
  stream.println ("          ((org.omg.CORBA_2_3.ORB) $orb).lookup_value_factory(id());");
  stream.print   ("      return $factory." + initializerName + " (");
  writeParmList (m, false, stream);
  stream.println (");");
  stream.println ("    } catch (ClassCastException $ex) {");
  stream.println ("      throw new org.omg.CORBA.BAD_PARAM ();");
  stream.println ("    }");
  stream.println ("  }");
  stream.println ();
}
 
Example 4
Source File: MethodGen24.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <d62023> Write the methodEntry for a valuetype factory method into
 *          the Value Helper class. Contents from email from Simon,
 *          4/25/99.
 **/
protected void helperFactoryMethod (Hashtable symbolTable, MethodEntry m, SymtabEntry t, PrintWriter stream)
{
  this.symbolTable = symbolTable;
  this.m = m;
  this.stream = stream;
  String initializerName = m.name ();
  String typeName = Util.javaName (t);
  String factoryName = typeName + "ValueFactory";

  // Step 1. Print factory method decl up to parms.
  stream.print  ("  public static " + typeName + " " + initializerName +
          " (org.omg.CORBA.ORB $orb");
  if (!m.parameters ().isEmpty ())
    stream.print (", "); // <d62794>

  // Step 2. Print the declaration parameter list.
  writeParmList (m, true, stream);

  // Step 3. Print the body of the factory method
  stream.println (")");
  stream.println ("  {");
  stream.println ("    try {");
  stream.println ("      " + factoryName + " $factory = (" + factoryName + ")");
  stream.println ("          ((org.omg.CORBA_2_3.ORB) $orb).lookup_value_factory(id());");
  stream.print   ("      return $factory." + initializerName + " (");
  writeParmList (m, false, stream);
  stream.println (");");
  stream.println ("    } catch (ClassCastException $ex) {");
  stream.println ("      throw new org.omg.CORBA.BAD_PARAM ();");
  stream.println ("    }");
  stream.println ("  }");
  stream.println ();
}
 
Example 5
Source File: MethodGen24.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * d62023 - write the methodEntry for a valuetype factory method into
 *          the Value Helper class. Contents from email from Simon,
 *          4/25/99.
 **/
protected void helperFactoryMethod (Hashtable symbolTable, MethodEntry m, SymtabEntry t, PrintWriter stream)
{
  this.symbolTable = symbolTable;
  this.m = m;
  this.stream = stream;
  String initializerName = m.name ();
  String typeName = Util.javaName (t);
  String factoryName = typeName + "ValueFactory";

  // Step 1. Print factory method decl up to parms.
  stream.print  ("  public static " + typeName + " " + initializerName +
          " (org.omg.CORBA.ORB $orb");
  if (!m.parameters ().isEmpty ())
    stream.print (", "); // <d62794>

  // Step 2. Print the declaration parameter list.
  writeParmList (m, true, stream);

  // Step 3. Print the body of the factory method
  stream.println (")");
  stream.println ("  {");
  stream.println ("    try {");
  stream.println ("      " + factoryName + " $factory = (" + factoryName + ")");
  stream.println ("          ((org.omg.CORBA_2_3.ORB) $orb).lookup_value_factory(id());");
  stream.print   ("      return $factory." + initializerName + " (");
  writeParmList (m, false, stream);
  stream.println (");");
  stream.println ("    } catch (ClassCastException $ex) {");
  stream.println ("      throw new org.omg.CORBA.BAD_PARAM ();");
  stream.println ("    }");
  stream.println ("  }");
  stream.println ();
}
 
Example 6
Source File: MethodGen24.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <d62023> Write the methodEntry for a valuetype factory method into
 *          the Value Helper class. Contents from email from Simon,
 *          4/25/99.
 **/
protected void helperFactoryMethod (Hashtable symbolTable, MethodEntry m, SymtabEntry t, PrintWriter stream)
{
  this.symbolTable = symbolTable;
  this.m = m;
  this.stream = stream;
  String initializerName = m.name ();
  String typeName = Util.javaName (t);
  String factoryName = typeName + "ValueFactory";

  // Step 1. Print factory method decl up to parms.
  stream.print  ("  public static " + typeName + " " + initializerName +
          " (org.omg.CORBA.ORB $orb");
  if (!m.parameters ().isEmpty ())
    stream.print (", "); // <d62794>

  // Step 2. Print the declaration parameter list.
  writeParmList (m, true, stream);

  // Step 3. Print the body of the factory method
  stream.println (")");
  stream.println ("  {");
  stream.println ("    try {");
  stream.println ("      " + factoryName + " $factory = (" + factoryName + ")");
  stream.println ("          ((org.omg.CORBA_2_3.ORB) $orb).lookup_value_factory(id());");
  stream.print   ("      return $factory." + initializerName + " (");
  writeParmList (m, false, stream);
  stream.println (");");
  stream.println ("    } catch (ClassCastException $ex) {");
  stream.println ("      throw new org.omg.CORBA.BAD_PARAM ();");
  stream.println ("    }");
  stream.println ("  }");
  stream.println ();
}
 
Example 7
Source File: MethodGen24.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <d62023> Write the methodEntry for a valuetype factory method into
 *          the Value Helper class. Contents from email from Simon,
 *          4/25/99.
 **/
protected void helperFactoryMethod (Hashtable symbolTable, MethodEntry m, SymtabEntry t, PrintWriter stream)
{
  this.symbolTable = symbolTable;
  this.m = m;
  this.stream = stream;
  String initializerName = m.name ();
  String typeName = Util.javaName (t);
  String factoryName = typeName + "ValueFactory";

  // Step 1. Print factory method decl up to parms.
  stream.print  ("  public static " + typeName + " " + initializerName +
          " (org.omg.CORBA.ORB $orb");
  if (!m.parameters ().isEmpty ())
    stream.print (", "); // <d62794>

  // Step 2. Print the declaration parameter list.
  writeParmList (m, true, stream);

  // Step 3. Print the body of the factory method
  stream.println (")");
  stream.println ("  {");
  stream.println ("    try {");
  stream.println ("      " + factoryName + " $factory = (" + factoryName + ")");
  stream.println ("          ((org.omg.CORBA_2_3.ORB) $orb).lookup_value_factory(id());");
  stream.print   ("      return $factory." + initializerName + " (");
  writeParmList (m, false, stream);
  stream.println (");");
  stream.println ("    } catch (ClassCastException $ex) {");
  stream.println ("      throw new org.omg.CORBA.BAD_PARAM ();");
  stream.println ("    }");
  stream.println ("  }");
  stream.println ();
}
 
Example 8
Source File: MethodGen24.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <d62023> Write the methodEntry for a valuetype factory method into
 *          the Value Helper class. Contents from email from Simon,
 *          4/25/99.
 **/
protected void helperFactoryMethod (Hashtable symbolTable, MethodEntry m, SymtabEntry t, PrintWriter stream)
{
  this.symbolTable = symbolTable;
  this.m = m;
  this.stream = stream;
  String initializerName = m.name ();
  String typeName = Util.javaName (t);
  String factoryName = typeName + "ValueFactory";

  // Step 1. Print factory method decl up to parms.
  stream.print  ("  public static " + typeName + " " + initializerName +
          " (org.omg.CORBA.ORB $orb");
  if (!m.parameters ().isEmpty ())
    stream.print (", "); // <d62794>

  // Step 2. Print the declaration parameter list.
  writeParmList (m, true, stream);

  // Step 3. Print the body of the factory method
  stream.println (")");
  stream.println ("  {");
  stream.println ("    try {");
  stream.println ("      " + factoryName + " $factory = (" + factoryName + ")");
  stream.println ("          ((org.omg.CORBA_2_3.ORB) $orb).lookup_value_factory(id());");
  stream.print   ("      return $factory." + initializerName + " (");
  writeParmList (m, false, stream);
  stream.println (");");
  stream.println ("    } catch (ClassCastException $ex) {");
  stream.println ("      throw new org.omg.CORBA.BAD_PARAM ();");
  stream.println ("    }");
  stream.println ("  }");
  stream.println ();
}