< prev index next >

src/hotspot/share/include/jvm.h

Print this page
rev 58565 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: duke
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com
rev 58568 : [mq]: hidden-class-4
   1 /*
   2  * Copyright (c) 1997, 2019, 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.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 372 JNIEXPORT jclass JNICALL
 373 JVM_FindClassFromClass(JNIEnv *env, const char *name, jboolean init,
 374                              jclass from);
 375 
 376 /* Find a loaded class cached by the VM */
 377 JNIEXPORT jclass JNICALL
 378 JVM_FindLoadedClass(JNIEnv *env, jobject loader, jstring name);
 379 
 380 /* Define a class */
 381 JNIEXPORT jclass JNICALL
 382 JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
 383                 jsize len, jobject pd);
 384 
 385 /* Define a class with a source (added in JDK1.5) */
 386 JNIEXPORT jclass JNICALL
 387 JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader,
 388                           const jbyte *buf, jsize len, jobject pd,
 389                           const char *source);
 390 
 391 /*















 392  * Module support funcions
 393  */
 394 
 395 /*
 396  * Define a module with the specified packages and bind the module to the
 397  * given class loader.
 398  *  module:       module to define
 399  *  is_open:      specifies if module is open (currently ignored)
 400  *  version:      the module version
 401  *  location:     the module location
 402  *  packages:     list of packages in the module
 403  *  num_packages: number of packages in the module
 404  */
 405 JNIEXPORT void JNICALL
 406 JVM_DefineModule(JNIEnv *env, jobject module, jboolean is_open, jstring version,
 407                  jstring location, const char* const* packages, jsize num_packages);
 408 
 409 /*
 410  * Set the boot loader's unnamed module.
 411  *  module: boot loader's unnamed module


 457 JVM_GetClassInterfaces(JNIEnv *env, jclass cls);
 458 
 459 JNIEXPORT jboolean JNICALL
 460 JVM_IsInterface(JNIEnv *env, jclass cls);
 461 
 462 JNIEXPORT jobjectArray JNICALL
 463 JVM_GetClassSigners(JNIEnv *env, jclass cls);
 464 
 465 JNIEXPORT void JNICALL
 466 JVM_SetClassSigners(JNIEnv *env, jclass cls, jobjectArray signers);
 467 
 468 JNIEXPORT jobject JNICALL
 469 JVM_GetProtectionDomain(JNIEnv *env, jclass cls);
 470 
 471 JNIEXPORT jboolean JNICALL
 472 JVM_IsArrayClass(JNIEnv *env, jclass cls);
 473 
 474 JNIEXPORT jboolean JNICALL
 475 JVM_IsPrimitiveClass(JNIEnv *env, jclass cls);
 476 



 477 JNIEXPORT jint JNICALL
 478 JVM_GetClassModifiers(JNIEnv *env, jclass cls);
 479 
 480 JNIEXPORT jobjectArray JNICALL
 481 JVM_GetDeclaredClasses(JNIEnv *env, jclass ofClass);
 482 
 483 JNIEXPORT jclass JNICALL
 484 JVM_GetDeclaringClass(JNIEnv *env, jclass ofClass);
 485 
 486 JNIEXPORT jstring JNICALL
 487 JVM_GetSimpleBinaryName(JNIEnv *env, jclass ofClass);
 488 
 489 /* Generics support (JDK 1.5) */
 490 JNIEXPORT jstring JNICALL
 491 JVM_GetClassSignature(JNIEnv *env, jclass cls);
 492 
 493 /* Annotations support (JDK 1.5) */
 494 JNIEXPORT jbyteArray JNICALL
 495 JVM_GetClassAnnotations(JNIEnv *env, jclass cls);
 496 


   1 /*
   2  * Copyright (c) 1997, 2020, 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.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 372 JNIEXPORT jclass JNICALL
 373 JVM_FindClassFromClass(JNIEnv *env, const char *name, jboolean init,
 374                              jclass from);
 375 
 376 /* Find a loaded class cached by the VM */
 377 JNIEXPORT jclass JNICALL
 378 JVM_FindLoadedClass(JNIEnv *env, jobject loader, jstring name);
 379 
 380 /* Define a class */
 381 JNIEXPORT jclass JNICALL
 382 JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
 383                 jsize len, jobject pd);
 384 
 385 /* Define a class with a source (added in JDK1.5) */
 386 JNIEXPORT jclass JNICALL
 387 JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader,
 388                           const jbyte *buf, jsize len, jobject pd,
 389                           const char *source);
 390 
 391 /*
 392  * Define a class with the specified lookup class.
 393  *  lookup:  Lookup class
 394  *  name:    the name of the class
 395  *  buf:     class bytes
 396  *  len:     length of class bytes
 397  *  pd:      protection domain
 398  *  init:    initialize the class
 399  *  flags:   properties of the class
 400  *  classData: private static pre-initialized field; may be null
 401  */
 402 JNIEXPORT jclass JNICALL
 403 JVM_LookupDefineClass(JNIEnv *env, jclass lookup, const char *name, const jbyte *buf,
 404                       jsize len, jobject pd, jboolean init, int flags, jobject classData);
 405 
 406 /*
 407  * Module support funcions
 408  */
 409 
 410 /*
 411  * Define a module with the specified packages and bind the module to the
 412  * given class loader.
 413  *  module:       module to define
 414  *  is_open:      specifies if module is open (currently ignored)
 415  *  version:      the module version
 416  *  location:     the module location
 417  *  packages:     list of packages in the module
 418  *  num_packages: number of packages in the module
 419  */
 420 JNIEXPORT void JNICALL
 421 JVM_DefineModule(JNIEnv *env, jobject module, jboolean is_open, jstring version,
 422                  jstring location, const char* const* packages, jsize num_packages);
 423 
 424 /*
 425  * Set the boot loader's unnamed module.
 426  *  module: boot loader's unnamed module


 472 JVM_GetClassInterfaces(JNIEnv *env, jclass cls);
 473 
 474 JNIEXPORT jboolean JNICALL
 475 JVM_IsInterface(JNIEnv *env, jclass cls);
 476 
 477 JNIEXPORT jobjectArray JNICALL
 478 JVM_GetClassSigners(JNIEnv *env, jclass cls);
 479 
 480 JNIEXPORT void JNICALL
 481 JVM_SetClassSigners(JNIEnv *env, jclass cls, jobjectArray signers);
 482 
 483 JNIEXPORT jobject JNICALL
 484 JVM_GetProtectionDomain(JNIEnv *env, jclass cls);
 485 
 486 JNIEXPORT jboolean JNICALL
 487 JVM_IsArrayClass(JNIEnv *env, jclass cls);
 488 
 489 JNIEXPORT jboolean JNICALL
 490 JVM_IsPrimitiveClass(JNIEnv *env, jclass cls);
 491 
 492 JNIEXPORT jboolean JNICALL
 493 JVM_IsHiddenClass(JNIEnv *env, jclass cls);
 494 
 495 JNIEXPORT jint JNICALL
 496 JVM_GetClassModifiers(JNIEnv *env, jclass cls);
 497 
 498 JNIEXPORT jobjectArray JNICALL
 499 JVM_GetDeclaredClasses(JNIEnv *env, jclass ofClass);
 500 
 501 JNIEXPORT jclass JNICALL
 502 JVM_GetDeclaringClass(JNIEnv *env, jclass ofClass);
 503 
 504 JNIEXPORT jstring JNICALL
 505 JVM_GetSimpleBinaryName(JNIEnv *env, jclass ofClass);
 506 
 507 /* Generics support (JDK 1.5) */
 508 JNIEXPORT jstring JNICALL
 509 JVM_GetClassSignature(JNIEnv *env, jclass cls);
 510 
 511 /* Annotations support (JDK 1.5) */
 512 JNIEXPORT jbyteArray JNICALL
 513 JVM_GetClassAnnotations(JNIEnv *env, jclass cls);
 514 


< prev index next >