Inner classes for unnamed objects in generated Java library #319

Closed
wonderfly opened this Issue Jan 10, 2015 · 5 comments

Comments

Projects
None yet
1 participant
Contributor

wonderfly commented Jan 10, 2015

From rmis...@google.com on September 27, 2011 08:46:04

Currently we generate top-level classes like this: http://javadoc.google-api-java-client.googlecode.com/hg/apis/discovery/com/google/api/services/discovery/model/RestDescriptionAuthOauth2Scopes.html I am not happy with two aspects of this:

  1. Class name is too long. It should be simpler.
  2. It clutters up the top-level class names list: http://javadoc.google-api-java-client.googlecode.com/hg/apis/discovery/com/google/api/services/discovery/model/package-frame.html Instead, if we generated these as inner classes, it would solve both of these issues. So it should instead generate something like this:

public class RestDescription {
public static class Auth {
public static class Oauth2 {
public static class Scopes {
...

Note that this way I can declare the import like this:

import com.google.api.services.discovery.model.RestDescription.Auth.Oauth2.Scopes;

and then refer to it simply as Scopes in my code.

Original issue: http://code.google.com/p/google-api-java-client/issues/detail?id=304

wonderfly self-assigned this Jan 10, 2015

Contributor

wonderfly commented Jan 10, 2015

From rmis...@google.com on September 27, 2011 10:43:32

This issue was reported internally by yanivi@google.com

Contributor

wonderfly commented Jan 10, 2015

From yan...@google.com on October 06, 2011 09:17:36

Labels: Component-Google-APIs

Contributor

wonderfly commented Jan 10, 2015

From rmis...@google.com on October 28, 2011 13:37:43

Labels: -Milestone-CodeGenVersion1.3.0 Milestone-CodeGenVersion1.4.0

Contributor

wonderfly commented Jan 10, 2015

From yan...@google.com on November 11, 2011 14:02:24

Status: Accepted

Contributor

wonderfly commented Jan 10, 2015

From rmis...@google.com on November 30, 2011 08:28:15

Status: Fixed

wonderfly closed this Jan 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment