Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inner classes for unnamed objects in generated Java library #319

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

Inner classes for unnamed objects in generated Java library #319

wonderfly opened this issue Jan 10, 2015 · 5 comments
Assignees
Labels
imported priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@wonderfly
Copy link
Contributor

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 wonderfly added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. imported priority: p2 Moderately-important priority. Fix may not be included in next release. 1 star labels Jan 10, 2015
@wonderfly wonderfly self-assigned this Jan 10, 2015
@wonderfly
Copy link
Contributor Author

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

This issue was reported internally by yanivi@google.com

@wonderfly
Copy link
Contributor Author

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

Labels: Component-Google-APIs

@wonderfly
Copy link
Contributor Author

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

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

@wonderfly
Copy link
Contributor Author

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

Status: Accepted

@wonderfly
Copy link
Contributor Author

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

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant