ClassFile.OptionClassFilepublic static sealed interface ClassFile.ClassHierarchyResolverOption extends ClassFile.Option
ClassHierarchyResolver.defaultResolver(), which uses core reflection to find a class with a given name in system class loader and inspect it, and is insufficient if a class is not present in the system class loader as in applications, or if loading of system classes is not desired as in agents. A ClassHierarchyResolverOption contains a ClassHierarchyResolver. The resolver must be able to process all classes and interfaces, including those appearing as the component types of array types, that appear in the operand stack of the generated bytecode. If the resolver fails on any of the classes and interfaces with an IllegalArgumentException, the class file generation fails.
| Modifier and Type | Method | Description |
|---|---|---|
ClassHierarchyResolver |
classHierarchyResolver() |
Returns the class hierarchy resolver. |
static ClassFile.ClassHierarchyResolverOption |
of |
Returns an option describing the class hierarchy resolver to use. |
static ClassFile.ClassHierarchyResolverOption of(ClassHierarchyResolver classHierarchyResolver)
classHierarchyResolver - the resolverClassHierarchyResolver classHierarchyResolver()
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/ClassFile.ClassHierarchyResolverOption.html