JavaValue.java revision 2224:2a8815d86b93
140036Smsmith/*
240036Smsmith * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
340036Smsmith * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
440036Smsmith *
540036Smsmith * This code is free software; you can redistribute it and/or modify it
640036Smsmith * under the terms of the GNU General Public License version 2 only, as
740036Smsmith * published by the Free Software Foundation.  Oracle designates this
840036Smsmith * particular file as subject to the "Classpath" exception as provided
940036Smsmith * by Oracle in the LICENSE file that accompanied this code.
1040036Smsmith *
1140036Smsmith * This code is distributed in the hope that it will be useful, but WITHOUT
1240036Smsmith * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1340036Smsmith * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1440036Smsmith * version 2 for more details (a copy is included in the LICENSE file that
1540036Smsmith * accompanied this code).
1640036Smsmith *
1740036Smsmith * You should have received a copy of the GNU General Public License version
1840036Smsmith * 2 along with this work; if not, write to the Free Software Foundation,
1940036Smsmith * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2040036Smsmith *
2140036Smsmith * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2240036Smsmith * or visit www.oracle.com if you need additional information or have any
2340036Smsmith * questions.
2440036Smsmith */
2540036Smsmith
2640036Smsmith
2740036Smsmith/*
2840036Smsmith * The Original Code is HAT. The Initial Developer of the
2940036Smsmith * Original Code is Bill Foote, with contributions from others
3040036Smsmith * at JavaSoft/Sun.
3140036Smsmith */
3240036Smsmith
3340036Smsmithpackage jdk.test.lib.hprof.model;
3440036Smsmith
3540036Smsmith/**
3640036Smsmith * Abstract base class for all value types (ints, longs, floats, etc.)
3740036Smsmith *
3840036Smsmith * @author      Bill Foote
3940036Smsmith */
4040036Smsmith
4140036Smsmith
4240036Smsmith
4340036Smsmith
4440036Smsmithpublic abstract class JavaValue extends JavaThing {
4540036Smsmith
4640036Smsmith    protected JavaValue() {
4740036Smsmith    }
4840036Smsmith
4940036Smsmith    public boolean isHeapAllocated() {
5040036Smsmith        return false;
5140036Smsmith    }
5240036Smsmith
5340036Smsmith    abstract public String toString();
5440036Smsmith
5540036Smsmith    public int getSize() {
5640036Smsmith        // The size of a value is already accounted for in the class
5740036Smsmith        // that has the data member.
5840036Smsmith        return 0;
5940036Smsmith    }
6040036Smsmith
6140036Smsmith}
6240036Smsmith