annotate scripts/deprecated/java_new.m @ 19898:4197fc428c7d

maint: Update copyright notices for 2015.
author John W. Eaton <jwe@octave.org>
date Wed, 11 Feb 2015 14:19:08 -0500
parents ebd27d8c63fd
children 9fc020886ae9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19898
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19842
diff changeset
1 ## Copyright (C) 2012-2015 Rik Wehbring
19842
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 ##
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3 ## This file is part of Octave.
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 ##
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 ## your option) any later version.
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 ##
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 ## General Public License for more details.
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 ##
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 ## <http://www.gnu.org/licenses/>.
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 ## -*- texinfo -*-
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 ## @deftypefn {Loadable Function} {@var{obj} =} java_new (@var{name})
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 ## @deftypefnx {Loadable Function} {@var{obj} =} java_new (@var{name}, @var{arg1}, @dots{})
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 ## Create a Java object of class @var{name}, by calling the class constructor
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 ## with the arguments @var{arg1}, @dots{}
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 ##
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 ## @example
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 ## @group
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 ## x = java_new ("java.lang.StringBuffer")
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 ## x = java_new ("java.lang.StringBuffer", "Initial string")
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 ## @end group
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 ## @end example
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 ##
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32 ## @seealso{javaObject, javaMethod}
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
33 ## @end deftypefn
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 function retval = java_new (varargin)
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 persistent warned = false;
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 if (! warned)
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 warned = true;
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 warning ("Octave:deprecated-function",
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41 "java_new is obsolete and will be removed from a future version of Octave; please use javaObject instead");
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 endif
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 if (nargin < 1)
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45 print_usage ();
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
46 endif
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
47
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48 retval = javaObject (varargin{:});
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
50 endfunction
ebd27d8c63fd update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51