Statements (74)
Predicate | Object |
---|---|
gptkbp:instance_of |
gptkb:Java_2_Platform
|
gptkbp:author |
gptkb:Javac_Team
|
gptkbp:benefits |
Reduces the need for constant values to be hardcoded.
|
gptkbp:community_feedback |
Positive feedback from developers.
|
gptkbp:compatibility |
Maintains backward compatibility.
|
gptkbp:conformance |
Must conform to the Java Language Specification.
|
gptkbp:created |
2019-12-16
|
gptkbp:description |
Enhances the instanceof operator to allow pattern matching.
Introduces sealed classes and interfaces to restrict which classes can extend or implement them. Introduces dynamic constants in class files. |
gptkbp:discusses |
Open JDK mailing list.
https://openjdk.java.net/jeps/289 |
gptkbp:effective_date |
Java SE 12.
|
gptkbp:example |
sealed interface Shape permits Circle, Square;
class A permits B, C; class B extends A; class C extends A; Dynamic constants in lambda expressions. |
gptkbp:future_prospects |
Potential enhancements.
|
https://www.w3.org/2000/01/rdf-schema#label |
JEP 289
|
gptkbp:impact |
Tooling support.
Compiler support. Language feature. Runtime support. Improves performance and flexibility of the Java language. |
gptkbp:involved_technology |
Java Class File Format.
|
gptkbp:is_adopted_by |
Widely adopted in JDK 12.
|
gptkbp:is_implemented_in |
gptkb:Java_Virtual_Machine
Implemented in the Java language. Completed. Requires JVM changes. |
gptkbp:is_motivated_by |
Improve the modeling of hierarchies.
Enhance the expressiveness of the Java language. |
gptkbp:is_tested_for |
Extensive testing required.
|
gptkbp:key_feature |
Enhances pattern matching capabilities.
Sealed classes allow control over class inheritance. Improves maintainability of code. Supports better API design. Provides a way to define a restricted class hierarchy. Dynamic resolution of constants. |
gptkbp:notable_contributor |
Various Java developers.
|
gptkbp:performance |
Improves runtime performance.
|
gptkbp:plot_summary |
Dynamic Class-File Constants enhance Java's capabilities.
|
gptkbp:proposed_by |
gptkb:Brian_Goetz
gptkb:JDK_12 |
gptkbp:related_concept |
Java SE Platform.
|
gptkbp:related_jeps |
gptkb:JEP_411
gptkb:JEP_360 gptkb:JEP_220 |
gptkbp:related_to |
Constant Pool
|
gptkbp:release_date |
March 2019.
|
gptkbp:released |
gptkb:Java_16
gptkb:JDK_12 |
gptkbp:reviews |
gptkb:Gilad_Bracha
gptkb:Brian_Goetz gptkb:Java_Community_Process gptkb:Venkat_Subramaniam gptkb:Mark_Reinhold gptkb:Jesse_Glick Community review. |
gptkbp:security |
No new security risks introduced.
|
gptkbp:specification |
Defines how dynamic constants are represented.
|
gptkbp:status |
gptkb:Final
Standard Feature |
gptkbp:target_audience |
Java developers.
|
gptkbp:target_jdk |
gptkb:JDK_15
|
gptkbp:targets |
gptkb:Java_SE_16
|
gptkbp:title |
gptkb:Pattern_Matching_for_instanceof
gptkb:Sealed_Classes Dynamic Class-File Constants |
gptkbp:updates |
2021-03-16
|
gptkbp:use_case |
Dynamic language features.
|
gptkbp:bfsParent |
gptkb:JEP_352
gptkb:JEP_367 gptkb:JEP_430 |
gptkbp:bfsLayer |
6
|