comparison agent/src/share/classes/sun/jvm/hotspot/jdi/NonConcreteMethodImpl.java @ 0:a61af66fc99e jdk7-b24

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children c18cbe5936b8
comparison
equal deleted inserted replaced
-1:000000000000 0:a61af66fc99e
1 /*
2 * Copyright 2002 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 * have any questions.
22 *
23 */
24
25 package sun.jvm.hotspot.jdi;
26
27 import com.sun.jdi.*;
28
29 import java.util.List;
30 import java.util.Map;
31 import java.util.Iterator;
32 import java.util.ListIterator;
33 import java.util.HashMap;
34 import java.util.ArrayList;
35 import java.util.Collections;
36
37 /**
38 * Represents non-concrete (that is, native or abstract) methods.
39 * Private to MethodImpl.
40 */
41 public class NonConcreteMethodImpl extends MethodImpl {
42
43 private Location location = null;
44
45 NonConcreteMethodImpl(VirtualMachine vm,
46 ReferenceTypeImpl declaringType,
47 sun.jvm.hotspot.oops.Method saMethod) {
48 super(vm, declaringType, saMethod);
49 }
50
51 public Location location() {
52 if (isAbstract()) {
53 return null;
54 }
55 if (location == null) {
56 location = new LocationImpl(vm, this, -1);
57 }
58 return location;
59 }
60
61 public List allLineLocations(String stratumID,
62 String sourceName) {
63 return new ArrayList(0);
64 }
65
66 public List allLineLocations(SDE.Stratum stratum,
67 String sourceName) {
68 return new ArrayList(0);
69 }
70
71 public List locationsOfLine(String stratumID,
72 String sourceName,
73 int lineNumber) {
74 return new ArrayList(0);
75 }
76
77 public List locationsOfLine(SDE.Stratum stratum,
78 String sourceName,
79 int lineNumber) {
80 return new ArrayList(0);
81 }
82
83 public Location locationOfCodeIndex(long codeIndex) {
84 return null;
85 }
86
87 LineInfo codeIndexToLineInfo(SDE.Stratum stratum,
88 long codeIndex) {
89
90 if (stratum.isJava()) {
91 return new BaseLineInfo(-1, declaringType);
92 } else {
93 return new StratumLineInfo(stratum.id(), -1,
94 null, null);
95 }
96 }
97
98 public List variables() throws AbsentInformationException {
99 throw new AbsentInformationException();
100 }
101
102 public List variablesByName(String name) throws AbsentInformationException {
103 throw new AbsentInformationException();
104 }
105
106 public List arguments() throws AbsentInformationException {
107 throw new AbsentInformationException();
108 }
109
110 public byte[] bytecodes() {
111 return new byte[0];
112 }
113
114 int argSlotCount() throws AbsentInformationException {
115 throw new InternalException("should not get here");
116 }
117 }