Path: blob/master/src/jdk.jdi/share/classes/com/sun/tools/jdi/NonConcreteMethodImpl.java
41161 views
/*1* Copyright (c) 2000, 2017, 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. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package com.sun.tools.jdi;2627import java.util.ArrayList;28import java.util.List;2930import com.sun.jdi.AbsentInformationException;31import com.sun.jdi.InternalException;32import com.sun.jdi.LocalVariable;33import com.sun.jdi.Location;34import com.sun.jdi.VirtualMachine;3536/**37* Represents non-concrete (that is, native or abstract) methods.38* Private to MethodImpl.39*/40public class NonConcreteMethodImpl extends MethodImpl {4142private Location location = null;4344NonConcreteMethodImpl(VirtualMachine vm,45ReferenceTypeImpl declaringType,46long ref, String name, String signature,47String genericSignature, int modifiers)48{49// The generic signature is set when this is created50super(vm, declaringType, ref, name, signature,51genericSignature, modifiers);52}5354public Location location() {55if (isAbstract()) {56return null;57}58if (location == null) {59location = new LocationImpl(vm, this, -1);60}61return location;62}6364public List<Location> allLineLocations(String stratumID,65String sourceName) {66return new ArrayList<>(0);67}6869public List<Location> allLineLocations(SDE.Stratum stratum,70String sourceName) {71return new ArrayList<>(0);72}7374public List<Location> locationsOfLine(String stratumID,75String sourceName,76int lineNumber) {77return new ArrayList<>(0);78}7980public List<Location> locationsOfLine(SDE.Stratum stratum,81String sourceName,82int lineNumber) {83return new ArrayList<>(0);84}8586public Location locationOfCodeIndex(long codeIndex) {87return null;88}8990public List<LocalVariable> variables() throws AbsentInformationException {91throw new AbsentInformationException();92}9394public List<LocalVariable> variablesByName(String name) throws AbsentInformationException {95throw new AbsentInformationException();96}9798public List<LocalVariable> arguments() throws AbsentInformationException {99throw new AbsentInformationException();100}101102public byte[] bytecodes() {103return new byte[0];104}105106int argSlotCount() throws AbsentInformationException {107throw new InternalException("should not get here");108}109}110111112