Package org.graalvm.nativeimage.hosted
Interface Feature.CompilationAccess
- All Superinterfaces:
Feature.FeatureAccess
- All Known Subinterfaces:
Feature.AfterCompilationAccess
,Feature.BeforeCompilationAccess
,Feature.BeforeHeapLayoutAccess
- Enclosing interface:
Feature
Access methods available for
Feature.beforeCompilation(org.graalvm.nativeimage.hosted.Feature.BeforeCompilationAccess)
and
Feature.afterCompilation(org.graalvm.nativeimage.hosted.Feature.AfterCompilationAccess)
.- Since:
- 19.0
-
Method Summary
Modifier and TypeMethodDescriptionlong
objectFieldOffset
(Field field) Returns the field offset of the provided instance field.void
registerAsImmutable
(Object object) Hint to the native image generator that the given object is immutable at runtime, i.e., can be placed in a read-only section of the native image heap.void
registerAsImmutable
(Object root, Predicate<Object> includeObject) Register the object, and everything it transitively references, as immutable.Methods inherited from interface org.graalvm.nativeimage.hosted.Feature.FeatureAccess
findClassByName, getApplicationClassLoader, getApplicationClassPath, getApplicationModulePath
-
Method Details
-
objectFieldOffset
Returns the field offset of the provided instance field.- Since:
- 19.0
-
registerAsImmutable
Hint to the native image generator that the given object is immutable at runtime, i.e., can be placed in a read-only section of the native image heap.- Since:
- 19.0
-
registerAsImmutable
Register the object, and everything it transitively references, as immutable. When the provided predicate returns false for an object, the object is not marked as immutable and the transitive iteration is stopped.- Since:
- 19.0
-