There is no public API to do this in the Solver.
However, if you are using Quarkus (like our quickstarts do), you can inject an instance of ConstraintMetaModel.
ConstraintMetaModel