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 package jdk.vm.ci.meta; 24 25 import java.lang.annotation.*; 26 import java.lang.invoke.*; 27 import java.lang.reflect.*; 28 import java.util.*; 29 30 /** 31 * Represents a resolved Java method. Methods, like fields and types, are resolved through 32 * {@link ConstantPool constant pools}. 33 */ 34 public interface ResolvedJavaMethod extends JavaMethod, InvokeTarget, ModifiersProvider { 35 36 /** 37 * Returns the bytecode of this method, if the method has code. The returned byte array does not 38 * contain breakpoints or non-Java bytecodes. This may return null if the 39 * {@link #getDeclaringClass() holder} is not {@link ResolvedJavaType#isLinked() linked}. 40 * 41 * The contained constant pool indices may not be the ones found in the original class file but 42 * they can be used with the JVMCI API (e.g. methods in {@link ConstantPool}). 43 * 44 * @return the bytecode of the method, or {@code null} if {@code getCodeSize() == 0} or if the 45 * code is not ready. 46 */ 47 byte[] getCode(); 48 | 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 package jdk.vm.ci.meta; 24 25 import java.lang.annotation.Annotation; 26 import java.lang.invoke.MethodHandle; 27 import java.lang.reflect.Array; 28 import java.lang.reflect.Method; 29 import java.lang.reflect.Modifier; 30 import java.lang.reflect.Type; 31 32 /** 33 * Represents a resolved Java method. Methods, like fields and types, are resolved through 34 * {@link ConstantPool constant pools}. 35 */ 36 public interface ResolvedJavaMethod extends JavaMethod, InvokeTarget, ModifiersProvider { 37 38 /** 39 * Returns the bytecode of this method, if the method has code. The returned byte array does not 40 * contain breakpoints or non-Java bytecodes. This may return null if the 41 * {@link #getDeclaringClass() holder} is not {@link ResolvedJavaType#isLinked() linked}. 42 * 43 * The contained constant pool indices may not be the ones found in the original class file but 44 * they can be used with the JVMCI API (e.g. methods in {@link ConstantPool}). 45 * 46 * @return the bytecode of the method, or {@code null} if {@code getCodeSize() == 0} or if the 47 * code is not ready. 48 */ 49 byte[] getCode(); 50 |