< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/BasicType.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2000, 2004, Oracle and/or its affiliates. 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. --- 1,7 ---- /* ! * Copyright (c) 2000, 2017, Oracle and/or its affiliates. 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.
*** 41,64 **** public static final int tVoid = 14; public static final int tAddress = 15; public static final int tConflict = 16; public static final int tIllegal = 99; ! public static final BasicType T_BOOLEAN = new BasicType(tBoolean); ! public static final BasicType T_CHAR = new BasicType(tChar); ! public static final BasicType T_FLOAT = new BasicType(tFloat); ! public static final BasicType T_DOUBLE = new BasicType(tDouble); ! public static final BasicType T_BYTE = new BasicType(tByte); ! public static final BasicType T_SHORT = new BasicType(tShort); ! public static final BasicType T_INT = new BasicType(tInt); ! public static final BasicType T_LONG = new BasicType(tLong); ! public static final BasicType T_OBJECT = new BasicType(tObject); ! public static final BasicType T_ARRAY = new BasicType(tArray); ! public static final BasicType T_VOID = new BasicType(tVoid); ! public static final BasicType T_ADDRESS = new BasicType(tAddress); ! public static final BasicType T_CONFLICT = new BasicType(tConflict); ! public static final BasicType T_ILLEGAL = new BasicType(tIllegal); public static int getTBoolean() { return tBoolean; } --- 41,64 ---- public static final int tVoid = 14; public static final int tAddress = 15; public static final int tConflict = 16; public static final int tIllegal = 99; ! public static final BasicType T_BOOLEAN = new BasicType(tBoolean, "boolean"); ! public static final BasicType T_CHAR = new BasicType(tChar, "char"); ! public static final BasicType T_FLOAT = new BasicType(tFloat, "float"); ! public static final BasicType T_DOUBLE = new BasicType(tDouble, "double"); ! public static final BasicType T_BYTE = new BasicType(tByte, "byte"); ! public static final BasicType T_SHORT = new BasicType(tShort, "short"); ! public static final BasicType T_INT = new BasicType(tInt, "int"); ! public static final BasicType T_LONG = new BasicType(tLong, "long"); ! public static final BasicType T_OBJECT = new BasicType(tObject, "object"); ! public static final BasicType T_ARRAY = new BasicType(tArray, "array"); ! public static final BasicType T_VOID = new BasicType(tVoid, "void"); ! public static final BasicType T_ADDRESS = new BasicType(tAddress, "*address"); ! public static final BasicType T_CONFLICT = new BasicType(tConflict, "*conflict"); ! public static final BasicType T_ILLEGAL = new BasicType(tIllegal, "ILLEGAL TYPE"); public static int getTBoolean() { return tBoolean; }
*** 113,122 **** --- 113,139 ---- public static int getTIllegal() { return tIllegal; } + public static BasicType intToBasicType(int i) { + switch( i ) { + case tByte: return T_BYTE; + case tChar: return T_CHAR; + case tDouble: return T_DOUBLE; + case tFloat: return T_FLOAT; + case tInt: return T_INT; + case tLong: return T_LONG; + case tShort: return T_SHORT; + case tBoolean: return T_BOOLEAN; + case tVoid: return T_VOID; + case tObject: return T_OBJECT; + case tArray: return T_ARRAY; + } + return T_ILLEGAL; + } + public static BasicType charToBasicType(char c) { switch( c ) { case 'B': return T_BYTE; case 'C': return T_CHAR; case 'D': return T_DOUBLE;
*** 138,149 **** public int getType() { return type; } //-- Internals only below this point ! private BasicType(int type) { this.type = type; } private int type; } --- 155,172 ---- public int getType() { return type; } + public String getName() { + return name; + } + //-- Internals only below this point ! private BasicType(int type, String name) { this.type = type; + this.name = name; } private int type; + private String name; }
< prev index next >