HackJavaValue.java revision 2224:2a8815d86b93
1169691Skan/* 2169691Skan * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. 3169691Skan * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4169691Skan * 5169691Skan * This code is free software; you can redistribute it and/or modify it 6169691Skan * under the terms of the GNU General Public License version 2 only, as 7169691Skan * published by the Free Software Foundation. Oracle designates this 8169691Skan * particular file as subject to the "Classpath" exception as provided 9169691Skan * by Oracle in the LICENSE file that accompanied this code. 10169691Skan * 11169691Skan * This code is distributed in the hope that it will be useful, but WITHOUT 12169691Skan * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13169691Skan * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14169691Skan * version 2 for more details (a copy is included in the LICENSE file that 15169691Skan * accompanied this code). 16169691Skan * 17169691Skan * You should have received a copy of the GNU General Public License version 18169691Skan * 2 along with this work; if not, write to the Free Software Foundation, 19169691Skan * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20169691Skan * 21169691Skan * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22169691Skan * or visit www.oracle.com if you need additional information or have any 23169691Skan * questions. 24169691Skan */ 25169691Skan 26169691Skan 27169691Skan/* 28169691Skan * The Original Code is HAT. The Initial Developer of the 29169691Skan * Original Code is Bill Foote, with contributions from others 30169691Skan * at JavaSoft/Sun. 31169691Skan */ 32169691Skan 33169691Skanpackage jdk.test.lib.hprof.model; 34169691Skan 35169691Skan/** 36169691Skan * This is used to represent values that the program doesn't really understand. 37169691Skan * This includes the null vlaue, and unresolved references (which shouldn't 38169691Skan * happen in well-formed hprof files). 39169691Skan * 40169691Skan * 41169691Skan * @author Bill Foote 42169691Skan */ 43169691Skan 44169691Skan 45169691Skan 46169691Skan 47169691Skanpublic class HackJavaValue extends JavaValue { 48169691Skan 49169691Skan private String value; 50169691Skan private int size; 51169691Skan 52169691Skan public HackJavaValue(String value, int size) { 53169691Skan this.value = value; 54169691Skan this.size = size; 55169691Skan } 56169691Skan 57169691Skan public String toString() { 58169691Skan return value; 59169691Skan } 60169691Skan 61169691Skan public int getSize() { 62169691Skan return size; 63169691Skan } 64169691Skan 65169691Skan} 66169691Skan