Oracle Java code conventions

让人想犯罪 __ 提交于 2019-12-17 09:39:31

问题


Does someone know where I can find the document by Oracle which describes Java code conventions?

This URL is not available anymore, for that reason I created new question for this topic.

http://www.oracle.com/technetwork/java/codeconv-138413.html


回答1:


One option is to use wayback machine, which seems to contain the document (here's direct link to pdf version). However I would also be interested to find out what Oracle did with it and do they intend to get rid of it.

There's a discussion on Oracle forums about this being raised to OTN support, but no response is mentioned.


Update on 17.6.2014: There's now a forum posting added to the site explaining the following:

Those Java Code Conventions were written in 1999 and have not been maintained since.

The information might not be up to date; links within the documents might not work. That is why the pages were removed. Unfortunately there are other sites that point to that document which were not updated.

To avoid confusions we have re-posted the original document –with an appropriate disclaimer about the information not being up to date- while we clean up those other sites.

Try Code Conventions for the Java Programming Language

And indeed, seems the page has been restored.




回答2:


The required basis is here:

Google:

  • https://github.com/google/styleguide
  • https://google.github.io/styleguide/javaguide.html

Oracle:

  • http://www.oracle.com/technetwork/java/codeconventions-150003.pdf

Spring:

  • https://github.com/spring-projects/spring-framework/wiki/Code-Style
  • https://github.com/47deg/coding-guidelines/tree/master/java/spring

More advanced stuff, related to logical structures in the book on page https://martinfowler.com/eaaCatalog/ and the book "Clean Code"





回答3:


I think that document is dated. SEI has published the latest standards - cool and really good.




回答4:


The document could be found at: http://www.oracle.com/technetwork/java/codeconventions-150003.pdf




回答5:


The old document seems to be available as HTML too http://www.oracle.com/technetwork/java/codeconvtoc-136057.html



来源:https://stackoverflow.com/questions/22961733/oracle-java-code-conventions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!