Suppress ecj warnings

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10226 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-01-31 22:58:43 +00:00
commit d98658d30b
5 changed files with 11 additions and 0 deletions

View file

@ -10,6 +10,10 @@
%pragma(java) moduleimports=%{ %pragma(java) moduleimports=%{
import java.io.*; // For Serializable import java.io.*; // For Serializable
%} %}
%pragma(java) modulecode=%{
public static final long serialVersionUID = 0x52151001; // Suppress ecj warning
%}
// Set default Java const code generation // Set default Java const code generation
%javaconst(1); %javaconst(1);

View file

@ -21,6 +21,7 @@ import java.lang.*; // For Exception
System.exit(1); System.exit(1);
} }
} }
public static final long serialVersionUID = 0x52151000; // Suppress ecj warning
%} %}
@ -33,6 +34,7 @@ import java.io.*; // For Serializable
%pragma(java) moduleinterfaces="Serializable" %pragma(java) moduleinterfaces="Serializable"
%pragma(java) modulecode=%{ %pragma(java) modulecode=%{
public static final long serialVersionUID = 0x52151001; // Suppress ecj warning
public static void added_function(String s) { public static void added_function(String s) {
// Added function // Added function
} }

View file

@ -85,6 +85,9 @@ int ioTest() { return 0; }
// except feature (%javaexception) specifying a checked exception class for the throws clause // except feature (%javaexception) specifying a checked exception class for the throws clause
%typemap(javabase) MyException "Throwable"; %typemap(javabase) MyException "Throwable";
%typemap(javacode) MyException %{
public static final long serialVersionUID = 0x52151000; // Suppress ecj warning
%}
%inline %{ %inline %{
struct MyException { struct MyException {
MyException(const char *msg) {} MyException(const char *msg) {}

View file

@ -19,6 +19,7 @@ import java.lang.*; // for Exception
%typemap(javabase) NS::Greeting "Exception"; %typemap(javabase) NS::Greeting "Exception";
%typemap(javainterfaces) NS::Greeting "EventListener"; %typemap(javainterfaces) NS::Greeting "EventListener";
%typemap(javacode) NS::Greeting %{ %typemap(javacode) NS::Greeting %{
public static final long serialVersionUID = 0x52151000; // Suppress ecj warning
// Pure Java code generated using %typemap(javacode) // Pure Java code generated using %typemap(javacode)
public void sayhello() { public void sayhello() {
hello(); hello();

View file

@ -22,6 +22,7 @@ import java.lang.*; // for Exception
%typemap(javabase) Greeting * "Exception"; %typemap(javabase) Greeting * "Exception";
%typemap(javainterfaces) Greeting * "EventListener"; %typemap(javainterfaces) Greeting * "EventListener";
%typemap(javacode) Greeting * %{ %typemap(javacode) Greeting * %{
public static final long serialVersionUID = 0x52151000; // Suppress ecj warning
// Pure Java code generated using %typemap(javacode) // Pure Java code generated using %typemap(javacode)
public static $javaclassname CreateNullPointer() { public static $javaclassname CreateNullPointer() {
return new $javaclassname(); return new $javaclassname();