Class ScopedValuesSecondPreviewNotes
java.lang.Object
net.jrodolfo.java_evolution.java22.scoped_values.ScopedValuesSecondPreviewNotes
Explains scoped values as a Java 22 second preview feature.
Scoped values address the same problem as the Java 21 preview: sharing
immutable contextual data through a bounded scope without the cleanup hazards
of many ThreadLocal designs.
Java 22 kept the API in preview, so this repository keeps the version entry explanatory and points to the final Java 25 scoped-values module for runnable code.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExplains bounded dynamic scope in plain language.nextStep()Points learners to the final Java 25 module.Explains the goal of scoped values.Describes the Java 22 maturity level.Compares scoped values with a common older approach.
-
Constructor Details
-
ScopedValuesSecondPreviewNotes
public ScopedValuesSecondPreviewNotes()
-
-
Method Details
-
problemSolved
-
threadLocalMotivation
Compares scoped values with a common older approach.- Returns:
- a short comparison
-
boundedDynamicScope
Explains bounded dynamic scope in plain language.- Returns:
- a short explanation
-
nextStep
Points learners to the final Java 25 module.- Returns:
- a short next-step note
-
secondPreviewStatus
Describes the Java 22 maturity level.- Returns:
- a short status note
-