annotate scripts/java/org/octave/OctaveReference.java @ 32632:2e484f9f1f18 stable

maint: update Octave Project Developers copyright for the new year
author John W. Eaton <jwe@octave.org>
date Fri, 22 Dec 2023 12:08:17 -0500
parents 597f3ee61a48
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 //
32632
2e484f9f1f18 maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 31706
diff changeset
3 // Copyright (C) 2007-2024 The Octave Project Developers
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 // distribution or <https://octave.org/copyright/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
9 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 // under the terms of the GNU General Public License as published by
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
13 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
14 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
18 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
19 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
20 // You should have received a copy of the GNU General Public License
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 // along with Octave; see the file COPYING. If not, see
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ////////////////////////////////////////////////////////////////////////
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 package org.octave;
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 public class OctaveReference
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 {
15753
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
30 private int ID;
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31
15753
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
32 public OctaveReference (int ID)
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
33 {
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
34 this.ID = ID;
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
35 }
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36
15753
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
37 private native static void doFinalize (int ID);
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38
15753
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
39 protected void finalize () throws Throwable
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
40 {
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
41 doFinalize (this.ID);
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
42 }
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43
15753
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
44 public String toString ()
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
45 {
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
46 return ("<octave reference " + this.ID + ">");
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
47 }
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48
15753
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
49 public int getID ()
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
50 {
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
51 return this.ID;
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
52 }
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53
15753
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
54 public Object invoke (Object[] args)
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
55 {
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
56 //System.out.println ("OctaveReference::invoke");
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
57 Octave.doInvoke (this.ID, args);
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
58 return null;
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
59 }
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
60
15753
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
61 public synchronized Object invokeAndWait (Object[] args)
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
62 {
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
63 //System.out.println ("OctaveReference::invokeandWait");
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
64 Octave.invokeAndWait (this, args);
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
65 return null;
6e39fe7992d9 style fixes and copyright update for java files
John W. Eaton <jwe@octave.org>
parents: 15752
diff changeset
66 }
15625
acf0addfc610 include Octave Forge java package in core Octave
John W. Eaton <jwe@octave.org>
parents:
diff changeset
67 }