Create java custom rule

You should call this list from the class that implements org.sonar.plugins.java.api.CheckRegistrar

And have an implementation of that class along the lines of :

 @Override
 public void register(RegistrarContext registrarContext) {
    registrarContext.registerClassesForRepository(
      "My_REPO_KEY",
      RulesList.getJavaChecks(),
      Collections.emptyList());
  }