< prev index next >

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

Print this page

  1 /*
  2  * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *

 60 
 61     // HotSpot specific constant pool constant types.
 62 
 63     // For bad value initialization
 64     public static final int JVM_CONSTANT_Invalid            = 0;
 65 
 66     public static final int JVM_CONSTANT_UnresolvedClass          = 100;  // Temporary tag until actual use
 67     public static final int JVM_CONSTANT_ClassIndex               = 101;  // Temporary tag while constructing constant pool
 68     public static final int JVM_CONSTANT_StringIndex              = 102;  // Temporary tag while constructing constant pool
 69     public static final int JVM_CONSTANT_UnresolvedClassInError   = 103;  // Error tag due to resolution error
 70     public static final int JVM_CONSTANT_MethodHandleInError      = 104;  // Error tag due to resolution error
 71     public static final int JVM_CONSTANT_MethodTypeInError        = 105;  // Error tag due to resolution error
 72 
 73     // 1.5 major/minor version numbers from JVM spec. 3rd edition
 74     public static final short MAJOR_VERSION = 49;
 75     public static final short MINOR_VERSION = 0;
 76 
 77     public static final short MAJOR_VERSION_OLD = 46;
 78     public static final short MINOR_VERSION_OLD = 0;
 79 




 80     // From jvm.h
 81     public static final long JVM_ACC_PUBLIC       = 0x0001; /* visible to everyone */
 82     public static final long JVM_ACC_PRIVATE      = 0x0002; /* visible only to the defining class */
 83     public static final long JVM_ACC_PROTECTED    = 0x0004; /* visible to subclasses */
 84     public static final long JVM_ACC_STATIC       = 0x0008; /* instance variable is static */
 85     public static final long JVM_ACC_FINAL        = 0x0010; /* no further subclassing, overriding */
 86     public static final long JVM_ACC_SYNCHRONIZED = 0x0020; /* wrap method call in monitor lock */
 87     public static final long JVM_ACC_SUPER        = 0x0020; /* funky handling of invokespecial */

 88     public static final long JVM_ACC_VOLATILE     = 0x0040; /* can not cache in registers */
 89     public static final long JVM_ACC_BRIDGE       = 0x0040; /* bridge method generated by compiler */
 90     public static final long JVM_ACC_TRANSIENT    = 0x0080; /* not persistent */
 91     public static final long JVM_ACC_VARARGS      = 0x0080; /* method declared with variable number of args */
 92     public static final long JVM_ACC_NATIVE       = 0x0100; /* implemented in C */
 93     public static final long JVM_ACC_INTERFACE    = 0x0200; /* class is an interface */
 94     public static final long JVM_ACC_ABSTRACT     = 0x0400; /* no definition provided */
 95     public static final long JVM_ACC_STRICT       = 0x0800; /* strict floating point */

 96     public static final long JVM_ACC_SYNTHETIC    = 0x1000; /* compiler-generated class, method or field */
 97     public static final long JVM_ACC_ANNOTATION   = 0x2000; /* annotation type */
 98     public static final long JVM_ACC_ENUM         = 0x4000; /* field is declared as element of enum */
 99 
100 
101     // from jvm.h
102     public static final long JVM_RECOGNIZED_CLASS_MODIFIERS   = (JVM_ACC_PUBLIC |
103                                                                  JVM_ACC_FINAL |
104                                                                  JVM_ACC_SUPER |

105                                                                  JVM_ACC_INTERFACE |
106                                                                  JVM_ACC_ABSTRACT |
107                                                                  JVM_ACC_ANNOTATION |
108                                                                  JVM_ACC_ENUM |
109                                                                  JVM_ACC_SYNTHETIC);
110 
111 
112     public static final long JVM_RECOGNIZED_FIELD_MODIFIERS  = (JVM_ACC_PUBLIC |
113                                                                 JVM_ACC_PRIVATE |
114                                                                 JVM_ACC_PROTECTED |
115                                                                 JVM_ACC_STATIC |
116                                                                 JVM_ACC_FINAL |
117                                                                 JVM_ACC_VOLATILE |
118                                                                 JVM_ACC_TRANSIENT |
119                                                                 JVM_ACC_ENUM |

120                                                                 JVM_ACC_SYNTHETIC);
121 
122     public static final long JVM_RECOGNIZED_METHOD_MODIFIERS  = (JVM_ACC_PUBLIC |
123                                                                  JVM_ACC_PRIVATE |
124                                                                  JVM_ACC_PROTECTED |
125                                                                  JVM_ACC_STATIC |
126                                                                  JVM_ACC_FINAL |
127                                                                  JVM_ACC_SYNCHRONIZED |
128                                                                  JVM_ACC_BRIDGE |
129                                                                  JVM_ACC_VARARGS |
130                                                                  JVM_ACC_NATIVE |
131                                                                  JVM_ACC_ABSTRACT |
132                                                                  JVM_ACC_STRICT |
133                                                                  JVM_ACC_SYNTHETIC);
134 }

  1 /*
  2  * Copyright (c) 2002, 2026, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *

 60 
 61     // HotSpot specific constant pool constant types.
 62 
 63     // For bad value initialization
 64     public static final int JVM_CONSTANT_Invalid            = 0;
 65 
 66     public static final int JVM_CONSTANT_UnresolvedClass          = 100;  // Temporary tag until actual use
 67     public static final int JVM_CONSTANT_ClassIndex               = 101;  // Temporary tag while constructing constant pool
 68     public static final int JVM_CONSTANT_StringIndex              = 102;  // Temporary tag while constructing constant pool
 69     public static final int JVM_CONSTANT_UnresolvedClassInError   = 103;  // Error tag due to resolution error
 70     public static final int JVM_CONSTANT_MethodHandleInError      = 104;  // Error tag due to resolution error
 71     public static final int JVM_CONSTANT_MethodTypeInError        = 105;  // Error tag due to resolution error
 72 
 73     // 1.5 major/minor version numbers from JVM spec. 3rd edition
 74     public static final short MAJOR_VERSION = 49;
 75     public static final short MINOR_VERSION = 0;
 76 
 77     public static final short MAJOR_VERSION_OLD = 46;
 78     public static final short MINOR_VERSION_OLD = 0;
 79 
 80     // Value types major and minor versions.
 81     public static final short VALUE_TYPES_MAJOR_VERSION = 70;
 82     public static final short JAVA_PREVIEW_MINOR_VERSION = (short) 65535;
 83 
 84     // From jvm.h
 85     public static final long JVM_ACC_PUBLIC       = 0x0001; /* visible to everyone */
 86     public static final long JVM_ACC_PRIVATE      = 0x0002; /* visible only to the defining class */
 87     public static final long JVM_ACC_PROTECTED    = 0x0004; /* visible to subclasses */
 88     public static final long JVM_ACC_STATIC       = 0x0008; /* instance variable is static */
 89     public static final long JVM_ACC_FINAL        = 0x0010; /* no further subclassing, overriding */
 90     public static final long JVM_ACC_SYNCHRONIZED = 0x0020; /* wrap method call in monitor lock */
 91     public static final long JVM_ACC_SUPER        = 0x0020; /* funky handling of invokespecial */
 92     public static final long JVM_ACC_IDENTITY     = 0x0020; /* identity class for 27 and above */
 93     public static final long JVM_ACC_VOLATILE     = 0x0040; /* can not cache in registers */
 94     public static final long JVM_ACC_BRIDGE       = 0x0040; /* bridge method generated by compiler */
 95     public static final long JVM_ACC_TRANSIENT    = 0x0080; /* not persistent */
 96     public static final long JVM_ACC_VARARGS      = 0x0080; /* method declared with variable number of args */
 97     public static final long JVM_ACC_NATIVE       = 0x0100; /* implemented in C */
 98     public static final long JVM_ACC_INTERFACE    = 0x0200; /* class is an interface */
 99     public static final long JVM_ACC_ABSTRACT     = 0x0400; /* no definition provided */
100     public static final long JVM_ACC_STRICT       = 0x0800; /* strict floating point */
101     public static final long JVM_ACC_STRICT_INIT  = 0x0800; /* strict field initialization */
102     public static final long JVM_ACC_SYNTHETIC    = 0x1000; /* compiler-generated class, method or field */
103     public static final long JVM_ACC_ANNOTATION   = 0x2000; /* annotation type */
104     public static final long JVM_ACC_ENUM         = 0x4000; /* field is declared as element of enum */
105 
106 
107     // from jvm.h
108     public static final long JVM_RECOGNIZED_CLASS_MODIFIERS   = (JVM_ACC_PUBLIC |
109                                                                  JVM_ACC_FINAL |
110                                                                  JVM_ACC_SUPER |
111                                                                  JVM_ACC_IDENTITY |
112                                                                  JVM_ACC_INTERFACE |
113                                                                  JVM_ACC_ABSTRACT |
114                                                                  JVM_ACC_ANNOTATION |
115                                                                  JVM_ACC_ENUM |
116                                                                  JVM_ACC_SYNTHETIC);
117 
118 
119     public static final long JVM_RECOGNIZED_FIELD_MODIFIERS  = (JVM_ACC_PUBLIC |
120                                                                 JVM_ACC_PRIVATE |
121                                                                 JVM_ACC_PROTECTED |
122                                                                 JVM_ACC_STATIC |
123                                                                 JVM_ACC_FINAL |
124                                                                 JVM_ACC_VOLATILE |
125                                                                 JVM_ACC_TRANSIENT |
126                                                                 JVM_ACC_ENUM |
127                                                                 JVM_ACC_STRICT_INIT |
128                                                                 JVM_ACC_SYNTHETIC);
129 
130     public static final long JVM_RECOGNIZED_METHOD_MODIFIERS  = (JVM_ACC_PUBLIC |
131                                                                  JVM_ACC_PRIVATE |
132                                                                  JVM_ACC_PROTECTED |
133                                                                  JVM_ACC_STATIC |
134                                                                  JVM_ACC_FINAL |
135                                                                  JVM_ACC_SYNCHRONIZED |
136                                                                  JVM_ACC_BRIDGE |
137                                                                  JVM_ACC_VARARGS |
138                                                                  JVM_ACC_NATIVE |
139                                                                  JVM_ACC_ABSTRACT |
140                                                                  JVM_ACC_STRICT |
141                                                                  JVM_ACC_SYNTHETIC);
142 }
< prev index next >