1 /* 2 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 package vm.runtime.defmeth.shared.data; 25 26 import vm.runtime.defmeth.shared.data.method.body.ReturnNewInstanceBody; 27 import vm.runtime.defmeth.shared.data.method.body.ReturnNullBody; 28 import vm.runtime.defmeth.shared.data.method.param.NewInstanceParam; 29 import vm.runtime.defmeth.shared.data.method.param.LongParam; 30 import vm.runtime.defmeth.shared.data.method.result.IntResult; 31 import vm.runtime.defmeth.shared.data.method.param.IntParam; 32 import vm.runtime.defmeth.shared.data.method.param.FloatParam; 33 import vm.runtime.defmeth.shared.data.method.body.EmptyBody; 34 import vm.runtime.defmeth.shared.data.method.param.DoubleParam; 35 import vm.runtime.defmeth.shared.data.method.DefaultMethod; 36 import vm.runtime.defmeth.shared.data.method.ConcreteMethod; 37 import vm.runtime.defmeth.shared.data.method.body.CallMethod; 38 import vm.runtime.defmeth.shared.data.method.AbstractMethod; 39 import vm.runtime.defmeth.shared.data.method.Method; 40 import vm.runtime.defmeth.shared.data.method.body.ReturnIntBody; 41 import vm.runtime.defmeth.shared.data.method.body.ThrowExBody; 42 import vm.runtime.defmeth.shared.data.method.result.ThrowExResult; 43 import vm.runtime.defmeth.shared.data.method.param.StringParam; 44 import vm.runtime.defmeth.shared.data.Clazz; 45 import vm.runtime.defmeth.shared.data.Interface; 46 import vm.runtime.defmeth.shared.data.*; 47 48 /** 49 * Visitor for vm.runtime.defmeth.shared.data.* class hierarchy. 50 */ 51 public interface Visitor { 52 53 // extends Clazz 54 public void visitClass ( Clazz clz); 55 public void visitConcreteClass(ConcreteClass clz); 56 public void visitInterface ( Interface intf); 57 58 // extends Method 59 public void visitMethod ( Method m); 60 public void visitConcreteMethod(ConcreteMethod m); 61 public void visitAbstractMethod(AbstractMethod m); 62 public void visitDefaultMethod ( DefaultMethod m); 63 64 public void visitTester( Tester t); 65 66 // implements MethodBody 67 public void visitThrowExBody ( ThrowExBody body); 68 public void visitReturnIntBody ( ReturnIntBody body); 69 public void visitReturnNullBody ( ReturnNullBody body); 70 public void visitEmptyBody ( EmptyBody body); 71 public void visitCallMethod ( CallMethod call); 72 public void visitReturnNewInstanceBody(ReturnNewInstanceBody body); 73 74 // implements Result 75 public void visitResultInt ( IntResult res); 76 public void visitResultThrowExc(ThrowExResult res); 77 public void visitResultIgnore (); 78 79 // implements Param 80 public void visitParamInt ( IntParam i); 81 public void visitParamLong ( LongParam l); 82 public void visitParamFloat ( FloatParam f); 83 public void visitParamDouble ( DoubleParam d); 84 public void visitParamString ( StringParam str); 85 public void visitParamNewInstance(NewInstanceParam type); 86 public void visitParamNull (); 87 }