diff options
Diffstat (limited to 'Examples/java/template/index.html')
-rw-r--r-- | Examples/java/template/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Examples/java/template/index.html b/Examples/java/template/index.html index 31dba6d8e..027aa60e4 100644 --- a/Examples/java/template/index.html +++ b/Examples/java/template/index.html @@ -41,7 +41,7 @@ template<class T> class vector { v[index] = val; } #ifdef SWIG - %addmethods { + %extend { T getitem(int index) { return self->get(index); } @@ -53,7 +53,7 @@ template<class T> class vector { }; </pre> </blockquote> -The %addmethods is used for a neater interface from Java as the functions <tt>get</tt> and <tt>set</tt> use C++ references to primitive types. These are tricky to use from Java as they end up as a pointer in Java (Java long). +The %extend is used for a neater interface from Java as the functions <tt>get</tt> and <tt>set</tt> use C++ references to primitive types. These are tricky to use from Java as they end up as a pointer in Java (Java long). <h2>The SWIG interface</h2> |