You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Switch core API value types to noun-style accessors #13035
Following the discussion in #11582, the Maven 4 API should consistently use noun-style accessors (record-accessor pattern) for immutable value types, in line with modern JDK conventions (see detailed analysis).
Several hand-crafted API interfaces already follow this pattern (XmlNode, PathType, Lifecycle.Phase, Packaging, ExtensibleEnum, OsService, CIInfo). The remaining core value type interfaces should be migrated as well.
Scope
For each interface, add the noun-style accessor as the primary abstract method and convert the existing getX() to a default method delegating to it, annotated with @Deprecated(since = "4.1.0", forRemoval = true). Boolean queries (is*()) and conversion methods (to*()) are left as-is.
Every new immutable type introduced in the JDK since Java 8 — unconstrained by pre-existing hierarchies — uses noun-style accessors exclusively. The getX() prefix is the JavaBeans convention for mutable components with getters/setters. See #11582 for the full JDK 8–25 survey.
Activity
Switch core API value types to noun-style accessors
Switch core API value types to noun-style accessors