JavaApiGenerator.java: getDeclaredMethods instead of getMethods