diff --git a/javaguide.css b/javaguide.css new file mode 100644 index 0000000..4571058 --- /dev/null +++ b/javaguide.css @@ -0,0 +1,507 @@ +table { + border-collapse: collapse; +} + +td, th { + border: 1px solid #ccc; + padding: 2px 12px; + font-size: 10pt; +} + +code, samp, var { + color: #060; +} + +pre { + font-size: 10pt; + display: block; + color: #060; + background-color: #e8fff6; + border-color: #f0fff0; + border-style: solid; + border-top-width: 1px; + border-bottom-width: 1px; + border-right-width: 1px; + border-left-width: 5px; + padding-left: 12px; + padding-right: 12px; + padding-top: 4px; + padding-bottom: 4px; +} + +pre.badcode { + color: #c00; + background-color: #ffe6d8; + border-color: #fff0f0; +} + +hr { + margin-top: 3.5em; + border-width: 1px; + color: #fff; +} + +html { + margin-top:2em; + margin-left:10%; + margin-right:10%; + padding:0; +} + +.bp-reset-element, +body, +h1, +h2, +h3, +h4, +h5, +h6, +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section, +summary, +blockquote, +q, +th, +td, +caption, +table, +div, +span, +object, +iframe, +p, +pre, +a, +abbr, +acronym, +address, +code, +del, +dfn, +em, +img, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +caption, +tbody, +tfoot, +thead, +tr { + margin:0; + padding:0; + border:0; + font-weight:inherit; + font-style:inherit; + font-size:100%; + font-family:inherit; + vertical-align:baseline; +} + +body { + font-family:'Arial', sans-serif; + font-size:81.25%; + color:#222; + background-color:#fff; + line-height:1.67; + overflow: auto; +} + +.change { + text-align: right; + margin-bottom:1em; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight:bold; +} + +h1 { + margin-bottom:.50em; + text-align: center +} + +h2, +h3, +h4, +h5, +h6 { + margin-top:1.5em; + margin-bottom:.75em; +} + +h1 {font-size:200%;} +h2 {font-size:167%;} +h3 {font-size:133%;} +h4 {font-size:120%;} +h5 {font-size:110%;} + +p { + margin:0 0 1.5em; +} + +a[href=''] { + cursor:default; +} + +h1 img, +h2 img, +h3 img, +h4 img, +h5 img, +h6 img { + margin:0; +} + +a img { + border:none; +} + +pre { + margin:1.5em 0; + white-space:pre; +} + +pre, +code, +kbd, +tt { + font:1em 'Droid Sans Mono', monospace; + line-height:1.5; +} + +dl { + margin:0 0 1.5em 0; +} + +dl dt { + font-weight:bold; +} + +dd { + margin-left:1.5em; +} + +hr { + height:0; + border:0; + border-top:1px solid #ccc; + background-color:#ccc; +} + +table { + border:1px solid #bbb; + border-spacing:0; + border-collapse:collapse; + margin:0 0 1.5em; + vertical-align:middle; + width:100%; +} + +table.unlined, +table.unlined th, +table.unlined tr, +table.unlined td { + border:0; +} + +th, +td, +caption { + float:none !important; + text-align:left; + font-weight:normal; + vertical-align:middle; + padding:4px; +} + +caption { + padding:0; +} + +td { + border:1px solid #bbb; + vertical-align:top; +} + +th { + border:0; + border-bottom:1px solid black; + font-weight:bold; + background:rgb(229, 236, 249); +} + +table th code { + background-color:inherit; + color:inherit; +} + +table tfoot th { + border:1px solid #bbb; +} + +tfoot { + font-style:italic; +} + +caption { + background:#eee; +} + +table[border='0'] { + border:none; +} + +table[border='0']>tbody>tr>td, +table[border='0']>tr>td { + border:none; +} + +tr.alt td, +td.alt { + background-color:#efefef; +} + +table.striped tr:nth-child(even) td, +table tr.even td { + background:#efefef; +} + +table.columns { + border:none; +} + +table.columns>tbody>tr>td, +table.columns>tr>td { + border:none; + padding:0 3em 0 0; +} + +table.columns>tbody>tr>td:last-child, +table.columns>tr>td:last-child { + border:none; + padding:0; +} + +ul, +ol { + margin:0 1.5em 1.5em 0; + padding-left:2em; +} + +li ul, +li ol { + margin:0; +} + +ul { + list-style-type:disc; +} + +ol { + list-style-type:decimal; +} + +ul { + list-style-type:disc; +} + +ul ul { + list-style-type:circle; +} + +ul ul ul { + list-style-type:square; +} + +ul.disc { + list-style-type:disc; +} + +ul.circle { + list-style-type:circle; +} + +ul.square { + list-style-type:square; +} + +ol { + list-style-type:decimal; +} + +ol ol { + list-style-type:lower-alpha; +} + +ol ol ol { + list-style-type:lower-roman; +} + +ol ul { + list-style-type:circle; +} + +ol.decimal { + list-style-type:decimal; +} + +ol.upper-alpha { + list-style-type:upper-alpha; +} + +ol.lower-alpha { + list-style-type:lower-alpha; +} + +ol.upper-roman { + list-style-type:upper-roman; +} + +ol.lower-roman { + list-style-type:lower-roman; +} + +ol.nolist, +ul.nolist { + padding-left:0; + list-style-image:none; + list-style-type:none; + margin-left:0; +} + +.center { + text-align:center; +} + +code, +kbd, +pre { + color:#007000; +} + +kbd { + font-weight: bold; +} + +table.striped code { + background-color:inherit; +} + +pre { + padding:6px 10px; + background-color:#FAFAFA; + border:1px solid #bbb; + overflow:auto; +} + +pre.prettyprint { + padding:6px 10px !important; + border:1px solid #bbb !important; +} + +code.bad, code.badcode { + background-color:#fcc; +} +pre.bad, pre.badcode { + background-color:#fcc; + border-top:1px inset #a03; + border-left:1px inset #a03; +} + +.tip { + background-color:#fffbd9; + padding:6px 8px 6px 10px; + border-left:6px solid #ffef70; +} + +.note { + background-color:#e5ecf9; + padding:6px 8px 6px 10px; + border-left:6px solid #36c; +} + +@media print { + + .str { + color:#060; + } + + .kwd { + color:#006; + font-weight:bold; + } + + .com { + color:#600; + font-style:italic; + } + + .typ { + color:#404; + font-weight:bold; + } + + .lit { + color:#044; + } + + .pun, + .opn, + .clo { + color:#440; + } + + .pln { + color:#000; + } + + .tag { + color:#006; + font-weight:bold; + } + + .atn { + color:#404; + } + + .atv { + color:#060; + } + + h1 { + font-style:italic; + } +} + +ol.linenums { + margin-top:0; + margin-bottom:0; +} + +code { + background-color:#FAFAFA; + padding: 0.25em 0.5em; + white-space: nowrap +} diff --git a/javaguide.html b/javaguide.html new file mode 100644 index 0000000..d09f49e --- /dev/null +++ b/javaguide.html @@ -0,0 +1,665 @@ + + + + + + + Google Java Style + + +

Google Java Style

+
Last changed: December 17, 2013
+ + + + +
+
+
+1 Introduction +
+
+1.1 Terminology notes +
+
+1.2 Guide notes +
+
+2 Source file basics +
+
+2.1 File name +
+
+2.2 File encoding: UTF-8 +
+
+2.3 Special characters +
+
+3 Source file structure +
+
+3.1 License or copyright information, if present +
+
+3.2 Package statement +
+
+3.3 Import statements +
+
+3.4 Class declaration +
+
+
+
+
+4 Formatting +
+
+4.1 Braces +
+
+4.2 Block indentation: +2 spaces +
+
+4.3 One statement per line +
+
+4.4 Column limit: 80 or 100 +
+
+4.5 Line-wrapping +
+
+4.6 Whitespace +
+
+4.7 Grouping parentheses: recommended +
+
+4.8 Specific constructs +
+
+5 Naming +
+
+5.1 Rules common to all identifiers +
+
+5.2 Rules by identifier type +
+
+5.3 Camel case: defined +
+
+
+
+
+6 Programming Practices +
+
+6.1 @Override: always used +
+
+6.2 Caught exceptions: not ignored +
+
+6.3 Static members: qualified using class +
+
+6.4 Finalizers: not used +
+
+7 Javadoc +
+
+7.1 Formatting +
+
+7.2 The summary fragment +
+
+7.3 Where Javadoc is used +
+
+
+

+
Last changed: December 17, 2013
+ + diff --git a/javaguidelink.png b/javaguidelink.png new file mode 100644 index 0000000..75d5c7b Binary files /dev/null and b/javaguidelink.png differ