Spring Modulith's @NamedInterface annotation is applicable to packages and types.
The currently available method for programmatic registration of NamedInterfaces appears to be primarily intended only to support named interfaces at the package level. Furthermore, all publicly accessible static builder methods on the NamedInterface class take only packages as arguments. There are two other methods which take classes as arguments and which could in principle be used programmatically, but they are both package-private.
I think it would be a good improvement to allow a mechanism for programmatic control of NamedInterfaces on classes. It may be as simple as making the two existing package-private methods public.
Spring Modulith's @NamedInterface annotation is applicable to packages and types.
The currently available method for programmatic registration of NamedInterfaces appears to be primarily intended only to support named interfaces at the package level. Furthermore, all publicly accessible static builder methods on the NamedInterface class take only packages as arguments. There are two other methods which take classes as arguments and which could in principle be used programmatically, but they are both package-private.
I think it would be a good improvement to allow a mechanism for programmatic control of NamedInterfaces on classes. It may be as simple as making the two existing package-private methods public.