0
|
1 /*
|
|
2 * Copyright 2000 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.types.basic;
|
|
26
|
|
27 import sun.jvm.hotspot.debugger.*;
|
|
28 import sun.jvm.hotspot.types.*;
|
|
29
|
|
30 /** This is an adapter class which allows delegation of operation to
|
|
31 another BasicCField; see, for example, BasicCharCFieldWrapper. */
|
|
32
|
|
33 public class BasicFieldWrapper implements Field {
|
|
34 protected Field field;
|
|
35
|
|
36 public BasicFieldWrapper(Field field) {
|
|
37 this.field = field;
|
|
38 }
|
|
39
|
|
40 public String getName() {
|
|
41 return field.getName();
|
|
42 }
|
|
43
|
|
44 public Type getType() {
|
|
45 return field.getType();
|
|
46 }
|
|
47
|
|
48 public long getSize() {
|
|
49 return field.getSize();
|
|
50 }
|
|
51
|
|
52 public boolean isStatic() {
|
|
53 return field.isStatic();
|
|
54 }
|
|
55
|
|
56 public long getOffset() throws WrongTypeException {
|
|
57 return field.getOffset();
|
|
58 }
|
|
59
|
|
60 public Address getStaticFieldAddress() throws WrongTypeException {
|
|
61 return field.getStaticFieldAddress();
|
|
62 }
|
|
63
|
|
64 public boolean getJBoolean (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
65 return field.getJBoolean(addr);
|
|
66 }
|
|
67 public byte getJByte (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
68 return field.getJByte(addr);
|
|
69 }
|
|
70 public char getJChar (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
71 return field.getJChar(addr);
|
|
72 }
|
|
73 public double getJDouble (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
74 return field.getJDouble(addr);
|
|
75 }
|
|
76 public float getJFloat (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
77 return field.getJFloat(addr);
|
|
78 }
|
|
79 public int getJInt (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
80 return field.getJInt(addr);
|
|
81 }
|
|
82 public long getJLong (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
83 return field.getJLong(addr);
|
|
84 }
|
|
85 public short getJShort (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
86 return field.getJShort(addr);
|
|
87 }
|
|
88 public long getCInteger (Address addr, CIntegerType type) throws UnmappedAddressException, UnalignedAddressException {
|
|
89 return field.getCInteger(addr, type);
|
|
90 }
|
|
91 public Address getAddress (Address addr) throws UnmappedAddressException, UnalignedAddressException {
|
|
92 return field.getAddress(addr);
|
|
93 }
|
|
94 public OopHandle getOopHandle(Address addr)
|
|
95 throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
|
96 return field.getOopHandle(addr);
|
|
97 }
|
|
98
|
|
99 public boolean getJBoolean () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
100 return field.getJBoolean();
|
|
101 }
|
|
102 public byte getJByte () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
103 return field.getJByte();
|
|
104 }
|
|
105 public char getJChar () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
106 return field.getJChar();
|
|
107 }
|
|
108 public double getJDouble () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
109 return field.getJDouble();
|
|
110 }
|
|
111 public float getJFloat () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
112 return field.getJFloat();
|
|
113 }
|
|
114 public int getJInt () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
115 return field.getJInt();
|
|
116 }
|
|
117 public long getJLong () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
118 return field.getJLong();
|
|
119 }
|
|
120 public short getJShort () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
|
121 return field.getJShort();
|
|
122 }
|
|
123 public long getCInteger (CIntegerType type) throws UnmappedAddressException, UnalignedAddressException {
|
|
124 return field.getCInteger(type);
|
|
125 }
|
|
126 public Address getAddress () throws UnmappedAddressException, UnalignedAddressException {
|
|
127 return field.getAddress();
|
|
128 }
|
|
129 public OopHandle getOopHandle()
|
|
130 throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
|
131 return field.getOopHandle();
|
|
132 }
|
|
133 }
|