Class StatementsBeforeSuperPreviewNotes

java.lang.Object
net.jrodolfo.java_evolution.java22.StatementsBeforeSuperPreviewNotes

public class StatementsBeforeSuperPreviewNotes extends Object
Explains statements before super(...) as a Java 22 preview feature.

Before this feature, an explicit super(...) or this(...) call had to be the first constructor statement. That made argument validation or preparation awkward when the superclass constructor needed already-checked values.

The feature allows constructor argument validation or preparation before an explicit superclass constructor invocation, within strict safety rules.

  • Constructor Details

    • StatementsBeforeSuperPreviewNotes

      public StatementsBeforeSuperPreviewNotes()
  • Method Details

    • purpose

      public String purpose()
      Explains the practical goal.
      Returns:
      a short explanation
    • limitation

      public String limitation()
      Names the key safety limitation.
      Returns:
      a short limitation
    • projectDecision

      public String projectDecision()
      Explains why this package uses notes.
      Returns:
      the project decision