Mercurial > hg > truffle
diff agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicFieldWrapper.java @ 0:a61af66fc99e jdk7-b24
Initial load
author | duke |
---|---|
date | Sat, 01 Dec 2007 00:00:00 +0000 |
parents | |
children | ba764ed4b6f2 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicFieldWrapper.java Sat Dec 01 00:00:00 2007 +0000 @@ -0,0 +1,133 @@ +/* + * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +package sun.jvm.hotspot.types.basic; + +import sun.jvm.hotspot.debugger.*; +import sun.jvm.hotspot.types.*; + +/** This is an adapter class which allows delegation of operation to + another BasicCField; see, for example, BasicCharCFieldWrapper. */ + +public class BasicFieldWrapper implements Field { + protected Field field; + + public BasicFieldWrapper(Field field) { + this.field = field; + } + + public String getName() { + return field.getName(); + } + + public Type getType() { + return field.getType(); + } + + public long getSize() { + return field.getSize(); + } + + public boolean isStatic() { + return field.isStatic(); + } + + public long getOffset() throws WrongTypeException { + return field.getOffset(); + } + + public Address getStaticFieldAddress() throws WrongTypeException { + return field.getStaticFieldAddress(); + } + + public boolean getJBoolean (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJBoolean(addr); + } + public byte getJByte (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJByte(addr); + } + public char getJChar (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJChar(addr); + } + public double getJDouble (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJDouble(addr); + } + public float getJFloat (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJFloat(addr); + } + public int getJInt (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJInt(addr); + } + public long getJLong (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJLong(addr); + } + public short getJShort (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJShort(addr); + } + public long getCInteger (Address addr, CIntegerType type) throws UnmappedAddressException, UnalignedAddressException { + return field.getCInteger(addr, type); + } + public Address getAddress (Address addr) throws UnmappedAddressException, UnalignedAddressException { + return field.getAddress(addr); + } + public OopHandle getOopHandle(Address addr) + throws UnmappedAddressException, UnalignedAddressException, NotInHeapException { + return field.getOopHandle(addr); + } + + public boolean getJBoolean () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJBoolean(); + } + public byte getJByte () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJByte(); + } + public char getJChar () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJChar(); + } + public double getJDouble () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJDouble(); + } + public float getJFloat () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJFloat(); + } + public int getJInt () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJInt(); + } + public long getJLong () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJLong(); + } + public short getJShort () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException { + return field.getJShort(); + } + public long getCInteger (CIntegerType type) throws UnmappedAddressException, UnalignedAddressException { + return field.getCInteger(type); + } + public Address getAddress () throws UnmappedAddressException, UnalignedAddressException { + return field.getAddress(); + } + public OopHandle getOopHandle() + throws UnmappedAddressException, UnalignedAddressException, NotInHeapException { + return field.getOopHandle(); + } +}