1223 }
1224 static bool is_instance(oop obj);
1225 };
1226
1227 // Interface to java.security.AccessControlContext objects
1228
1229 class java_security_AccessControlContext: AllStatic {
1230 private:
1231 // Note that for this class the layout changed between JDK1.2 and JDK1.3,
1232 // so we compute the offsets at startup rather than hard-wiring them.
1233 static int _context_offset;
1234 static int _privilegedContext_offset;
1235 static int _isPrivileged_offset;
1236 static int _isAuthorized_offset;
1237
1238 static void compute_offsets();
1239 public:
1240 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
1241 static oop create(objArrayHandle context, bool isPrivileged, Handle privileged_context, TRAPS);
1242
1243 static bool is_authorized(Handle context);
1244
1245 // Debugging/initialization
1246 friend class JavaClasses;
1247 };
1248
1249
1250 // Interface to java.lang.ClassLoader objects
1251
1252 #define CLASSLOADER_INJECTED_FIELDS(macro) \
1253 macro(java_lang_ClassLoader, loader_data, intptr_signature, false)
1254
1255 class java_lang_ClassLoader : AllStatic {
1256 private:
1257 static int _loader_data_offset;
1258 static bool offsets_computed;
1259 static int parent_offset;
1260 static int parallelCapable_offset;
1261 static int name_offset;
1262 static int nameAndId_offset;
1263 static int unnamedModule_offset;
1264
1297
1298 // Debugging
1299 friend class JavaClasses;
1300 friend class ClassFileParser; // access to number_of_fake_fields
1301 };
1302
1303
1304 // Interface to java.lang.System objects
1305
1306 class java_lang_System : AllStatic {
1307 private:
1308 static int static_in_offset;
1309 static int static_out_offset;
1310 static int static_err_offset;
1311 static int static_security_offset;
1312
1313 public:
1314 static int in_offset_in_bytes();
1315 static int out_offset_in_bytes();
1316 static int err_offset_in_bytes();
1317
1318 static bool has_security_manager();
1319
1320 static void compute_offsets();
1321 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
1322
1323 // Debugging
1324 friend class JavaClasses;
1325 };
1326
1327
1328 // Interface to java.lang.StackTraceElement objects
1329
1330 class java_lang_StackTraceElement: AllStatic {
1331 private:
1332 static int declaringClassObject_offset;
1333 static int classLoaderName_offset;
1334 static int moduleName_offset;
1335 static int moduleVersion_offset;
1336 static int declaringClass_offset;
1337 static int methodName_offset;
1338 static int fileName_offset;
|
1223 }
1224 static bool is_instance(oop obj);
1225 };
1226
1227 // Interface to java.security.AccessControlContext objects
1228
1229 class java_security_AccessControlContext: AllStatic {
1230 private:
1231 // Note that for this class the layout changed between JDK1.2 and JDK1.3,
1232 // so we compute the offsets at startup rather than hard-wiring them.
1233 static int _context_offset;
1234 static int _privilegedContext_offset;
1235 static int _isPrivileged_offset;
1236 static int _isAuthorized_offset;
1237
1238 static void compute_offsets();
1239 public:
1240 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
1241 static oop create(objArrayHandle context, bool isPrivileged, Handle privileged_context, TRAPS);
1242
1243 // Debugging/initialization
1244 friend class JavaClasses;
1245 };
1246
1247
1248 // Interface to java.lang.ClassLoader objects
1249
1250 #define CLASSLOADER_INJECTED_FIELDS(macro) \
1251 macro(java_lang_ClassLoader, loader_data, intptr_signature, false)
1252
1253 class java_lang_ClassLoader : AllStatic {
1254 private:
1255 static int _loader_data_offset;
1256 static bool offsets_computed;
1257 static int parent_offset;
1258 static int parallelCapable_offset;
1259 static int name_offset;
1260 static int nameAndId_offset;
1261 static int unnamedModule_offset;
1262
1295
1296 // Debugging
1297 friend class JavaClasses;
1298 friend class ClassFileParser; // access to number_of_fake_fields
1299 };
1300
1301
1302 // Interface to java.lang.System objects
1303
1304 class java_lang_System : AllStatic {
1305 private:
1306 static int static_in_offset;
1307 static int static_out_offset;
1308 static int static_err_offset;
1309 static int static_security_offset;
1310
1311 public:
1312 static int in_offset_in_bytes();
1313 static int out_offset_in_bytes();
1314 static int err_offset_in_bytes();
1315
1316 static void compute_offsets();
1317 static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
1318
1319 // Debugging
1320 friend class JavaClasses;
1321 };
1322
1323
1324 // Interface to java.lang.StackTraceElement objects
1325
1326 class java_lang_StackTraceElement: AllStatic {
1327 private:
1328 static int declaringClassObject_offset;
1329 static int classLoaderName_offset;
1330 static int moduleName_offset;
1331 static int moduleVersion_offset;
1332 static int declaringClass_offset;
1333 static int methodName_offset;
1334 static int fileName_offset;
|