File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data class with package (default) access vs public

 
David Fishman
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

In the interest of hiding the data access details from the GUI client I have created an adapter interface and class as already discussed in many threads. In addition, I am thinking of changing the access to the Data class from public to package (default), so that the only methods accessible to the GUI client would be the adapter ones.
I have actually seen this suggested in previous threads, with some warnings that this may not be acceptable (though I can not see any "musts" being violated by this), or that Sun's automated checking actually expects the Data class to have public access and would fail the submission otherwise.
Has anyone implemented the above and passed, or knows of other people's experience ?

Thanks
 
David Fishman
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To all who are interested, I actually emailed Sun regarding this and they replied that it is acceptable for the Data class to have default access.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic