Mercurial > hg > octave-nkf
changeset 15792:12394261da0f
doc: tweak docstrings for javaObject and javaArray.
* libinterp/octave-value/ov-java.cc: Improve docstring. Add seealso to javaArray.
* scripts/java/javaArray.m: Improve docstring. Add seealso to javaObject.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 14 Dec 2012 13:58:19 -0800 |
parents | 49f5962fa20d |
children | 06832c90ae7d |
files | libinterp/octave-value/ov-java.cc scripts/java/javaArray.m |
diffstat | 2 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-java.cc +++ b/libinterp/octave-value/ov-java.cc @@ -1875,22 +1875,22 @@ DEFUN (javaObject, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {@var{obj} =} javaObject (@var{classname})\n\ -@deftypefnx {Built-in Function} {@var{obj} =} javaObject (@var{classname}, @var{arg1}, @dots{})\n\ +@deftypefn {Built-in Function} {@var{jobj} =} javaObject (@var{classname})\n\ +@deftypefnx {Built-in Function} {@var{jobj} =} javaObject (@var{classname}, @var{arg1}, @dots{})\n\ Create a Java object of class @var{classsname}, by calling the class\n\ constructor with the arguments @var{arg1}, @dots{}\n\ \n\ -The first example creates an uninitialized object, \\n\ -while the second example supplies an initializer argument.\n\ +The first example creates an uninitialized object,\n\ +while the second example supplies an initial argument to the constructor.\n\ \n\ @example\n\ @group\n\ - x = javaObject (\"java.lang.StringBuffer\")\n\ - x = javaObject (\"java.lang.StringBuffer\", \"Initial string\")\n\ +x = javaObject (\"java.lang.StringBuffer\")\n\ +x = javaObject (\"java.lang.StringBuffer\", \"Initial string\")\n\ @end group\n\ @end example\n\ \n\ -@seealso{javaMethod}\n\ +@seealso{javaMethod, javaArray}\n\ @end deftypefn") { #ifdef HAVE_JAVA @@ -1913,7 +1913,7 @@ retval = octave_java::do_javaObject (current_env, classname, tmp); } else - error ("javaObject: CLASSNAME argument must be a string"); + error ("javaObject: CLASSNAME must be a string"); } else print_usage ();
--- a/scripts/java/javaArray.m +++ b/scripts/java/javaArray.m @@ -17,8 +17,8 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {@var{a} =} javaArray (@var{classname}, @var{sz}) -## @deftypefnx {Function File} {@var{a} =} javaArray (@var{classname}, @var{m}, @var{n}, @dots{}) +## @deftypefn {Function File} {@var{jary} =} javaArray (@var{classname}, @var{sz}) +## @deftypefnx {Function File} {@var{jary} =} javaArray (@var{classname}, @var{m}, @var{n}, @dots{}) ## ## Create a Java array of size @var{sz} with elements of class ## @var{classname}. @var{classname} may be a Java object representing a class @@ -32,10 +32,11 @@ ## ## @example ## @group -## a = javaArray ("java.lang.String", 2, 2); -## a(1,1) = "Hello"; +## jary = javaArray ("java.lang.String", 2, 2); +## jary(1,1) = "Hello"; ## @end group ## @end example +## @seealso{javaObject} ## @end deftypefn function retval = javaArray (classname, varargin)