--- old/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicType.java 2009-08-01 04:06:56.023886264 +0100 +++ new/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/basic/BasicType.java 2009-08-01 04:06:55.953914248 +0100 @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2008 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 @@ -273,6 +273,10 @@ return (OopField) field; } + public NarrowOopField getNarrowOopField(String fieldName) throws WrongTypeException { + return (NarrowOopField) new BasicNarrowOopField(getOopField(fieldName)); + } + public AddressField getAddressField(String fieldName) { // This type can not be inferred (for now), so provide a wrapper Field field = getField(fieldName); @@ -287,7 +291,7 @@ name was already present in this class. */ public void addField(Field field) { if (nameToFieldMap.get(field.getName()) != null) { - throw new RuntimeException("field of name \"" + field.getName() + "\" already present"); + throw new RuntimeException("field of name \"" + field.getName() + "\" already present in type " + this); } nameToFieldMap.put(field.getName(), field);