Class AotObjectCachingExamples
java.lang.Object
net.jrodolfo.java_evolution.java26.aot_object_caching.AotObjectCachingExamples
Demonstrates the Java 26 AOT object-caching command-line workflow.
The example launches a tiny source file in a child JVM with
-XX:AOTCacheOutput, then launches it again with -XX:AOTCache.
It verifies cache creation and reuse, not startup performance.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult of the complete AOT object-caching workflow.static final recordResult from one child-JVM invocation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDescribes the Java 26 idea.Source code used by the child JVM.problem()Explains the startup problem addressed by AOT object caching.runAotObjectCachingWorkflow(Path workspace) Creates and then uses an AOT object cache in a temporary workspace.Explains the boundary of this executable example.
-
Constructor Details
-
AotObjectCachingExamples
public AotObjectCachingExamples()
-
-
Method Details
-
runAotObjectCachingWorkflow
public AotObjectCachingExamples.AotObjectCachingWorkflowResult runAotObjectCachingWorkflow(Path workspace) throws IOException, InterruptedException Creates and then uses an AOT object cache in a temporary workspace.- Parameters:
workspace- temporary directory for generated source and cache files- Returns:
- results from both child-JVM runs and the generated cache metadata
- Throws:
IOException- when the source cannot be written or a child process cannot be startedInterruptedException- when waiting for a child process is interrupted
-
probeSource
Source code used by the child JVM.- Returns:
- a small source-launcher program with stable output markers
-
problem
Explains the startup problem addressed by AOT object caching.- Returns:
- a short problem statement
-
java26Idea
-
testBoundary
Explains the boundary of this executable example.- Returns:
- a short test-boundary explanation
-