Class PemEncodingsSecondPreviewExamples
java.lang.Object
net.jrodolfo.java_evolution.java26.PemEncodingsSecondPreviewExamples
Demonstrates the second preview of PEM encodings of cryptographic objects
from JEP 524.
The preview API is exercised in an isolated child JVM. The generated probe performs an in-memory PEM encode/decode round trip using deterministic DER bytes, so the main Maven build does not need preview flags or cryptographic files.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult from one child process invocation.static final recordResult from compiling and running the generated preview source. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExplains the scope of this example.Explains why the preview API runs in a child process.Source used by the child JVM to exercise the preview PEM API.purpose()Explains the feature goal.runPemWorkflow(Path workspace) Runs the Java 26 preview PEM round-trip workflow.status()Explains the second-preview status.
-
Constructor Details
-
PemEncodingsSecondPreviewExamples
public PemEncodingsSecondPreviewExamples()
-
-
Method Details
-
runPemWorkflow
public PemEncodingsSecondPreviewExamples.PemWorkflowResult runPemWorkflow(Path workspace) throws IOException, InterruptedException Runs the Java 26 preview PEM round-trip workflow.- Parameters:
workspace- temporary directory for generated source and classes- Returns:
- result containing compilation and execution output
- Throws:
IOException- when the source file cannot be writtenInterruptedException- when waiting for a child process is interrupted
-
probeSource
Source used by the child JVM to exercise the preview PEM API.- Returns:
- generated Java source
-
purpose
-
status
-
previewBoundary
Explains why the preview API runs in a child process.- Returns:
- the preview boundary
-
exampleScope
-