Mercurial > octave-nkf
comparison scripts/deprecated/javafields.m @ 19628:fe689210525c gui-release
maint: Periodic merge of stable to gui-release.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Jan 2015 10:05:42 -0500 |
parents | e124ae274013 446c46af4b42 |
children |
comparison
equal
deleted
inserted
replaced
19624:6d75f1683ce8 | 19628:fe689210525c |
---|---|
18 | 18 |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {} javafields (@var{javaobj}) | 20 ## @deftypefn {Function File} {} javafields (@var{javaobj}) |
21 ## @deftypefnx {Function File} {} javafields ("@var{classname}") | 21 ## @deftypefnx {Function File} {} javafields ("@var{classname}") |
22 ## @deftypefnx {Function File} {@var{fld_names} =} javafields (@dots{}) | 22 ## @deftypefnx {Function File} {@var{fld_names} =} javafields (@dots{}) |
23 ## Return the fields of a Java object or Java class in the form of a cell | 23 ## Return the fields of a Java object or Java class in the form of a cell |
24 ## array of strings. If no output is requested, print the result | 24 ## array of strings. If no output is requested, print the result |
25 ## to the standard output. | 25 ## to the standard output. |
26 ## @seealso{fieldnames, methods, javaObject} | 26 ## @seealso{fieldnames, methods, javaObject} |
27 ## @end deftypefn | 27 ## @end deftypefn |
28 | 28 |
32 if (! warned) | 32 if (! warned) |
33 warned = true; | 33 warned = true; |
34 warning ("Octave:deprecated-function", | 34 warning ("Octave:deprecated-function", |
35 "javafields is obsolete and will be removed from a future version of Octave, please use fieldnames instead"); | 35 "javafields is obsolete and will be removed from a future version of Octave, please use fieldnames instead"); |
36 endif | 36 endif |
37 | 37 |
38 if (nargin != 1) | 38 if (nargin != 1) |
39 print_usage (); | 39 print_usage (); |
40 endif | 40 endif |
41 | 41 |
42 c_methods = javaMethod ("getFields", "org.octave.ClassHelper", javaobj); | 42 c_methods = javaMethod ("getFields", "org.octave.ClassHelper", javaobj); |
43 method_list = ostrsplit (c_methods, ';'); | 43 method_list = ostrsplit (c_methods, ';'); |
44 | 44 |
45 if (nargout == 0) | 45 if (nargout == 0) |
46 if (! isempty (method_list)) | 46 if (! isempty (method_list)) |