Notes

  1. Enums should be avoided because not extensibles. Use Strings and constants.
  2. Expose as less as possible dependencies on third-party libraries, especially like hibernate and even such as commons-collections
  3. Provide all the required classes to correctly and simply write unit tests. For example if interface implementations must not exposed in public API, then they can be available in a public package named "internal". See https://github.com/SonarSource/sonar/tree/master/sonar-plugin-api/src/main/java/org/sonar/api/workflow

Good patterns

  1. Examples: Sensor/SensorContext, Decorator/DecoratorContext

    interface Executor {
      void execute(Context context);
    }
    

Links