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
parent 0460574284
commit d98658d30b
5 changed files with 11 additions and 0 deletions

View File

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

View File

@ -21,6 +21,7 @@ import java.lang.*; // For Exception
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) modulecode=%{
public static final long serialVersionUID = 0x52151001; // Suppress ecj warning
public static void added_function(String s) {
// Added function
}

View File

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

View File

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

View File

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