W3cubDocs

/OpenJDK 25

Interface ClassFile.ClassHierarchyResolverOption

All Superinterfaces:
ClassFile.Option
Enclosing interface:
ClassFile
public static sealed interface ClassFile.ClassHierarchyResolverOption extends ClassFile.Option
The option describing the class hierarchy resolver to use when generating stack maps or verifying classes. The default is 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.

See Java Virtual Machine Specification:
4.10.1.2 Verification Type System
Since:
24
See Also:

Method Summary

Modifier and Type Method Description
ClassHierarchyResolver classHierarchyResolver()
Returns the class hierarchy resolver.
static ClassFile.ClassHierarchyResolverOption of(ClassHierarchyResolver classHierarchyResolver)
Returns an option describing the class hierarchy resolver to use.

Method Details

of

static ClassFile.ClassHierarchyResolverOption of(ClassHierarchyResolver classHierarchyResolver)
Returns an option describing the class hierarchy resolver to use.
Parameters:
classHierarchyResolver - the resolver
Returns:
an option describing the class hierarchy resolver to use

classHierarchyResolver

ClassHierarchyResolver classHierarchyResolver()
Returns the class hierarchy resolver.
Returns:
the class hierarchy resolver

© 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