Adds generator method support to Java