This key is useful when generating various interesting experimental stubs.

2006-03-23  Audrius Meskauskas  <[EMAIL PROTECTED]>

   * tools/gnu/classpath/tools/giop/GRMIC.java (main): Accept -force.
   * tools/gnu/classpath/tools/giop/GRMIC.txt: Explain -force.
   * tools/gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java
   (force): New field. (setForce): New method. (compile): Handle -force.
   * tools/gnu/classpath/tools/rmi/RMIC.java (main): Accept -force.
   * tools/gnu/classpath/tools/rmi/RMIC.txt: Explain -force.
Index: gnu/classpath/tools/giop/GRMIC.java
===================================================================
RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/giop/GRMIC.java,v
retrieving revision 1.2
diff -u -r1.2 GRMIC.java
--- gnu/classpath/tools/giop/GRMIC.java	8 Feb 2006 12:14:05 -0000	1.2
+++ gnu/classpath/tools/giop/GRMIC.java	23 Mar 2006 15:32:52 -0000
@@ -105,6 +105,10 @@
                 verbose = true;
                 compiler.setVerbose(true);
               }
+            else if (c.equals("-force"))
+              {
+                compiler.setForce(true);
+              }
             else if (c.equals("-d"))
               {
                 int f = i + 1;
Index: gnu/classpath/tools/giop/GRMIC.txt
===================================================================
RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/giop/GRMIC.txt,v
retrieving revision 1.2
diff -u -r1.2 GRMIC.txt
--- gnu/classpath/tools/giop/GRMIC.txt	9 Feb 2006 20:22:07 -0000	1.2
+++ gnu/classpath/tools/giop/GRMIC.txt	23 Mar 2006 15:32:52 -0000
@@ -19,6 +19,9 @@
   -help         Print this help text
   -v            Print version
   -verbose      Verbose output
+  -force        Try to generate code even if the input classes seem not
+                consistent with RMI specification. 
+  
   
  and <class names> can include one or more non abstract classes that implement
  Remote and are accessible via current class path.
Index: gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java
===================================================================
RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java,v
retrieving revision 1.4
diff -u -r1.4 GiopRmicCompiler.java
--- gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java	19 Feb 2006 20:12:05 -0000	1.4
+++ gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java	23 Mar 2006 15:32:53 -0000
@@ -115,6 +115,11 @@
    * Verbose output
    */
   protected boolean verbose = false;
+  
+  /**
+   * Force mode - do not check the exceptions
+   */
+  protected boolean force = false;
 
   /**
    * Clear data, preparing for the next compilation.
@@ -204,7 +209,7 @@
                     remEx = true;
                     break;
                   }
-                if (! remEx)
+                if (! remEx && !force)
                   throw new CompilationError(m[i].getName() + ", defined in "
                                              + c.getName()
                                              + ", does not throw "
@@ -483,6 +488,14 @@
   {
     warnings = warn;
   }
+  
+  /**
+   * Set the error ignore mode.
+   */
+  public void setForce(boolean isforce)
+  {
+    force = isforce;
+  }
 
   /**
    * Get the package name.
Index: gnu/classpath/tools/rmi/RMIC.java
===================================================================
RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/rmi/RMIC.java,v
retrieving revision 1.2
diff -u -r1.2 RMIC.java
--- gnu/classpath/tools/rmi/RMIC.java	19 Feb 2006 20:12:05 -0000	1.2
+++ gnu/classpath/tools/rmi/RMIC.java	23 Mar 2006 15:32:54 -0000
@@ -114,6 +114,10 @@
                 verbose = true;
                 compiler.setVerbose(true);
               }
+            else if (c.equals("-force"))
+              {
+                compiler.setForce(true);
+              }            
             else if (c.equals("-d"))
               {
                 int f = i + 1;
Index: gnu/classpath/tools/rmi/RMIC.txt
===================================================================
RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/rmi/RMIC.txt,v
retrieving revision 1.1
diff -u -r1.1 RMIC.txt
--- gnu/classpath/tools/rmi/RMIC.txt	9 Feb 2006 20:22:07 -0000	1.1
+++ gnu/classpath/tools/rmi/RMIC.txt	23 Mar 2006 15:32:54 -0000
@@ -16,6 +16,8 @@
   -help         Print this help text
   -v            Print version
   -verbose      Verbose output
+  -force        Try to generate code even if the input classes seem not
+                consistent with RMI specification.
   
   -1.2          Generate v 1.2 stubs (default)*
   

Reply via email to