From 642dad3f0c13a8a900aac21fe26e1eb672fbb5a6 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 17 Jul 2009 21:25:36 +0200 Subject: Very minor typos in Data/GetterSetter, added an index page for the features overview, and increased transparancy on the pepper background. --- website/features/Data.html | 29 +++++++++++++++------------ website/features/GetterSetter.html | 29 +++++++++++++++------------ website/features/features.css | 25 ++++++++++++++++++++++- website/features/index.html | 35 +++++++++++++++++++++++++++++++++ website/features/lombok-background.png | Bin 34309 -> 34208 bytes website/logi/reset.css | 2 +- 6 files changed, 92 insertions(+), 28 deletions(-) create mode 100644 website/features/index.html (limited to 'website') diff --git a/website/features/Data.html b/website/features/Data.html index 3a9697cc..23f9cea8 100644 --- a/website/features/Data.html +++ b/website/features/Data.html @@ -41,6 +41,20 @@ instance. This way, javac will infer the variable name. Thus, by declaring like so: @Data(staticConstructor="of") class Foo<T> { private T x;} you can create new instances of Foo by writing: Foo.of(5); instead of having to write: new Foo<Integer>(5);.

+ +
+
+

With Lombok

+
@HTML_PRE@
+
+
+
+

Vanilla Java

+
@HTML_POST@
+
+
+
+

Small print

Arrays are 'deep' compared/printed/hashCoded, which means that arrays that contain themselves will result in StackOverflowErrors. However, @@ -49,7 +63,7 @@ You may safely presume that the hashCode implementation used will not change between versions of lombok, however this guarantee is not set in stone; if there's a significant performance improvement to be gained from using an alternate hash algorithm, that will be substituted in a future version.

- For a general idea of how lombok generated the equals, hashCode, and toString methods, check the example below. + For a general idea of how lombok generated the equals, hashCode, and toString methods, check the example after.

For the purposes of equality, 2 NaN (not a number) values for floats and doubles are considered equal, eventhough 'NaN == NaN' would return false. This is analogous to java.lang.Double's equals method, and is in fact required to ensure that comparing an object @@ -57,19 +71,8 @@

-
-
-

With Lombok

-
@HTML_PRE@
-
-
-
-

Vanilla Java

-
@HTML_POST@
-
-
diff --git a/website/features/GetterSetter.html b/website/features/GetterSetter.html index 9840d3ba..e865cfff 100644 --- a/website/features/GetterSetter.html +++ b/website/features/GetterSetter.html @@ -20,9 +20,23 @@ if the field's type is boolean). A default setter is named setFoo if the field is called foo, returns void, and takes 1 parameter of the same type as the field. It simply sets the field to this value.

- The generated getter/setter method will be public unless you explicitly specify an AccessLevel, as shown in the example below. + The generated getter/setter method will be public unless you explicitly specify an AccessLevel, as shown in the example above. Legal access levels are PUBLIC, PROTECTED, PACKAGE, and PRIVATE.

+ +
+
+

With Lombok

+
@HTML_PRE@
+
+
+
+

Vanilla Java

+
@HTML_POST@
+
+
+
+

Small print

For generating the method names, the first character of the field, if it is a lowercase character, is title-cased, otherwise, it is left unmodified. @@ -37,19 +51,8 @@

-
-
-

With Lombok

-
@HTML_PRE@
-
-
-
-

Vanilla Java

-
@HTML_POST@
-
-
diff --git a/website/features/features.css b/website/features/features.css index 4f8fe468..f2eff7fc 100644 --- a/website/features/features.css +++ b/website/features/features.css @@ -33,10 +33,33 @@ h1 { text-align: center; } -.overview code { +.index { + font-size: 1.2em; + margin: 64px 0px 32px 64px; +} + +.index dt { + margin-top: 8px; font-size: 1.2em; } +.index dd { + margin-left: 32px; +} + +.overview code { + font-size: 1.1em; +} + +.smallprint { + font-size: 0.8em; + color: #444; +} + +.smallprint code { + font-size: 1em; +} + .snippets { margin-top: 32px; } diff --git a/website/features/index.html b/website/features/index.html new file mode 100644 index 00000000..c270f4e3 --- /dev/null +++ b/website/features/index.html @@ -0,0 +1,35 @@ + + + + + + + + Lombok feature overview + +
+
+
+ +

Lombok features

+
+
+
@Getter / @Setter
+
Never write public int getFoo() {return foo;} again.
+
@Data
+
'struct' for java: Automatically generate toString, hashCode, equals, a constructor, and getters and setters + from just the fields in your class.
+
@Cleanup
+
Automatic resource management: Call your close() methods safely with no hassle.
+
@Synchronized
+
synchronized done right: Don't expose your locks.
+
@SneakyThrows
+
To boldly throw checked exceptions where no one has thrown them before!
+
+
+
+ Copyright © 2009 Reinier Zwitserloot and Roel Spilker, licensed under the MIT licence. +
+
+
+
diff --git a/website/features/lombok-background.png b/website/features/lombok-background.png index 0fbdf64c..aac3195a 100644 Binary files a/website/features/lombok-background.png and b/website/features/lombok-background.png differ diff --git a/website/logi/reset.css b/website/logi/reset.css index 665af406..7ef561aa 100644 --- a/website/logi/reset.css +++ b/website/logi/reset.css @@ -18,7 +18,7 @@ body{ } code,kbd,tt{ - font-family:"Courier New", Courier, monospace; + font-family: "Courier new", Courier; line-height:1; *line-height:1.5; } -- cgit