Annotation Interface FactoryMethod


@Retention(RUNTIME) @Target(METHOD) public @interface FactoryMethod
Marks the annotated method as a factory method. A matching method will be generated in the factory class, which forwards to this method.

This annotation can be used to make backwards-compatible changes to an event class. By creating a method matching the old factory method signature, code expecting the old event signature will continue to function.