Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/java/rmi/activation/Activatable/checkAnnotations/CheckAnnotations_Stub.java
38829 views
/*1* Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223// Stub class generated by rmic, do not edit.24// Contents subject to change without notice.2526public final class CheckAnnotations_Stub27extends java.rmi.server.RemoteStub28implements MyRMI, java.rmi.Remote29{30private static final java.rmi.server.Operation[] operations = {31new java.rmi.server.Operation("void printErr(java.lang.String)"),32new java.rmi.server.Operation("void printOut(java.lang.String)"),33new java.rmi.server.Operation("void shutdown()")34};3536private static final long interfaceHash = -3955951123118841923L;3738private static final long serialVersionUID = 2;3940private static boolean useNewInvoke;41private static java.lang.reflect.Method $method_printErr_0;42private static java.lang.reflect.Method $method_printOut_1;43private static java.lang.reflect.Method $method_shutdown_2;4445static {46try {47java.rmi.server.RemoteRef.class.getMethod("invoke",48new java.lang.Class[] {49java.rmi.Remote.class,50java.lang.reflect.Method.class,51java.lang.Object[].class,52long.class53});54useNewInvoke = true;55$method_printErr_0 = MyRMI.class.getMethod("printErr", new java.lang.Class[] {java.lang.String.class});56$method_printOut_1 = MyRMI.class.getMethod("printOut", new java.lang.Class[] {java.lang.String.class});57$method_shutdown_2 = MyRMI.class.getMethod("shutdown", new java.lang.Class[] {});58} catch (java.lang.NoSuchMethodException e) {59useNewInvoke = false;60}61}6263// constructors64public CheckAnnotations_Stub() {65super();66}67public CheckAnnotations_Stub(java.rmi.server.RemoteRef ref) {68super(ref);69}7071// methods from remote interfaces7273// implementation of printErr(String)74public void printErr(java.lang.String $param_String_1)75throws java.rmi.RemoteException76{77try {78if (useNewInvoke) {79ref.invoke(this, $method_printErr_0, new java.lang.Object[] {$param_String_1}, 1120261287704800747L);80} else {81java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);82try {83java.io.ObjectOutput out = call.getOutputStream();84out.writeObject($param_String_1);85} catch (java.io.IOException e) {86throw new java.rmi.MarshalException("error marshalling arguments", e);87}88ref.invoke(call);89ref.done(call);90}91} catch (java.lang.RuntimeException e) {92throw e;93} catch (java.rmi.RemoteException e) {94throw e;95} catch (java.lang.Exception e) {96throw new java.rmi.UnexpectedException("undeclared checked exception", e);97}98}99100// implementation of printOut(String)101public void printOut(java.lang.String $param_String_1)102throws java.rmi.RemoteException103{104try {105if (useNewInvoke) {106ref.invoke(this, $method_printOut_1, new java.lang.Object[] {$param_String_1}, -7517735248176918178L);107} else {108java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);109try {110java.io.ObjectOutput out = call.getOutputStream();111out.writeObject($param_String_1);112} catch (java.io.IOException e) {113throw new java.rmi.MarshalException("error marshalling arguments", e);114}115ref.invoke(call);116ref.done(call);117}118} catch (java.lang.RuntimeException e) {119throw e;120} catch (java.rmi.RemoteException e) {121throw e;122} catch (java.lang.Exception e) {123throw new java.rmi.UnexpectedException("undeclared checked exception", e);124}125}126127// implementation of shutdown()128public void shutdown()129throws java.lang.Exception130{131if (useNewInvoke) {132ref.invoke(this, $method_shutdown_2, null, -7207851917985848402L);133} else {134java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);135ref.invoke(call);136ref.done(call);137}138}139}140141142