add generic-java hook [merge]