Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/jdi/PrimitiveValue.java
38831 views
/*1* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package com.sun.jdi;2627/**28* The value assigned to a field or variable of primitive type in a29* target VM. Each primitive values is accessed through a subinterface30* of this interface.31*32* @author Robert Field33* @author Gordon Hirsch34* @author James McIlree35* @since 1.336*/37@jdk.Exported38public interface PrimitiveValue extends Value {3940/**41* Converts this value to a BooleanValue and returns the result42* as a boolean.43*44* @return <code>true</code> if this value is non-zero (or45* <code>true</code> if already a BooleanValue); false otherwise.46*/47boolean booleanValue();4849/**50* Converts this value to a ByteValue and returns the result51* as a byte. The value will be narrowed as52* necessary, and magnitude or precision information53* may be lost (as if the primitive had been cast to a byte).54*55* @return the value, converted to byte56*/57byte byteValue();5859/**60* Converts this value to a CharValue and returns the result61* as a char. The value will be narrowed or widened as62* necessary, and magnitude or precision information63* may be lost (as if the primitive had been cast to a char,64* in the narrowing case).65*66* @return the value, converted to char67*/68char charValue();6970/**71* Converts this value to a ShortValue and returns the result72* as a short. The value will be narrowed or widened as73* necessary, and magnitude or precision information74* may be lost (as if the primitive had been cast to a short,75* in the narrowing case).76*77* @return the value, converted to short78*/79short shortValue();8081/**82* Converts this value to an IntegerValue and returns the result83* as an int. The value will be narrowed or widened as84* necessary, and magnitude or precision information85* may be lost (as if the primitive had been cast to an int,86* in the narrowing case).87*88* @return the value, converted to int89*/90int intValue();9192/**93* Converts this value to a LongValue and returns the result94* as a long. The value will be narrowed or widened as95* necessary, and magnitude or precision information96* may be lost (as if the primitive had been cast to a long,97* in the narrowing case).98*99* @return the value, converted to long100*/101long longValue();102103/**104* Converts this value to a FloatValue and returns the result105* as a float. The value will be narrowed or widened as106* necessary, and magnitude or precision information107* may be lost (as if the primitive had been cast to a float,108* in the narrowing case).109*110* @return the value, converted to float111*/112float floatValue();113114/**115* Converts this value to a DoubleValue and returns the result116* as a double. The value will be widened as117* necessary, and precision information118* may be lost.119*120* @return the value, converted to double121*/122double doubleValue();123}124125126