Recently, I’ve been writing many Hamcrest custom matchers for datasource-proxy. (see my previous post - datasource-proxy 1.4: focusing on JDBC test)

From my old memory, hamcrest(java) had a code generator to aggregate all custom matcher methods. “Sugar Generation” using @Factory and org.hamcrest.generator.config.XmlConfigurator according to the old google code documentation.

After some research, I found the generator is no longer available.

The code generation complicates the build. But it’s as easy to maintain the generated classes by hand.

From github issue:

Also, commit to delete @Factory annotation

So, for aggregated Matchers class, you manage it on your own, now.
I like it rather than generated class :)

In [v2.0.0.0]( org.hamcrest java-hamcrest jar), generator is not there anymore.

Since Hamcrest doesn’t have much documentation, I am writing down the information here for reference anybody who may be looking for the hamcrest sugar generation.