Class VectorApiFifthIncubatorExamples
java.lang.Object
net.jrodolfo.java_evolution.java20.vector_api.VectorApiFifthIncubatorExamples
Demonstrates the Java 20 Vector API, continued as a fifth incubator by JEP
438.
The repository itself does not compile against incubator modules. Instead,
this example writes a small Java source file, compiles it with
javac --add-modules jdk.incubator.vector --release 20, and runs it
with java --add-modules jdk.incubator.vector. That keeps the main
Maven build stable while still demonstrating the real incubator API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult from one child process invocation.static final recordResult from compiling, inspecting, and running the generated Vector API source. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExplains why this example uses a child process.Explains the Vector API idea.Describes the Java 20 maturity level.nextStep()Points learners to the later Vector API module.Explains the common older approach.Source used by the child JVM to exercise the Java 20 incubator API.Explains the practical problem.Names realistic use cases.runVectorWorkflow(Path workspace) Runs a real Java 20 Vector API workflow in a temporary workspace.Explains what this executable example can and cannot prove.
-
Constructor Details
-
VectorApiFifthIncubatorExamples
public VectorApiFifthIncubatorExamples()
-
-
Method Details
-
runVectorWorkflow
public VectorApiFifthIncubatorExamples.VectorWorkflowResult runVectorWorkflow(Path workspace) throws IOException, InterruptedException Runs a real Java 20 Vector API workflow in a temporary workspace.- Parameters:
workspace- temporary directory for generated source and class files- Returns:
- result containing compilation, class inspection, and execution output
- Throws:
IOException- when source files cannot be writtenInterruptedException- when waiting for a child process is interrupted
-
probeSource
Source used by the child JVM to exercise the Java 20 incubator API.- Returns:
- generated Java source
-
problemSolved
-
oldApproachProblem
-
incubatorIdea
-
realUseCases
-
incubatorStatus
-
incubatorBoundary
Explains why this example uses a child process.- Returns:
- the incubator-module boundary
-
testBoundary
Explains what this executable example can and cannot prove.- Returns:
- the test boundary
-
nextStep
Points learners to the later Vector API module.- Returns:
- a short next-step note
-