aboutsummaryrefslogtreecommitdiff
path: root/website/features/index.html
blob: 06b6763e5de1e3ca2eb5f041cee05b7b61bcb47b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html><head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="../logi/reset.css" />
	<link rel="stylesheet" type="text/css" href="features.css" />
	<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
	<meta name="description" content="Spice up your java" />
	<title>Lombok feature overview</title>
</head><body><div id="pepper">
	<div class="minimumHeight"></div>
	<div class="meat">
		<div class="header"><a href="../index.html">Project Lombok</a></div>
		<h1>Lombok features</h1>
		<div class="index overview">
			<dl>
				<dt><a href="GetterSetter.html"><code>@Getter</code> / <code>@Setter</code></a></dt>
				<dd>Never write <code>public int getFoo() {return foo;}</code> again.</dd>
				<dt><a href="GetterLazy.html"><code>@Getter(lazy=true)</code></a></dt>
				<dd>Laziness is a virtue!</dd>
				<dt><a href="ToString.html"><code>@ToString</code></a></dt>
				<dd>No need to start a debugger to see your fields: Just let lombok generate a <code>toString</code> for you!</dd>
				<dt><a href="EqualsAndHashCode.html"><code>@EqualsAndHashCode</code></a></dt>
				<dd>Equality made easy: Generates <code>hashCode</code> and <code>equals</code> implementations from the fields of your object.</dd>
				<dt><a href="Constructor.html"><code>@NoArgsConstructor</code>, <code>@RequiredArgsConstructor</code> and <code>@AllArgsConstructor</code></a></dt>
				<dd>Constructors made to order: Generates constructors that take no arguments, one argument per final / non-null field, or one argument for every field.</dd>
				<dt><a href="Data.html"><code>@Data</code></a></dt>
				<dd>All together now: A shortcut for <code>@ToString</code>, <code>@EqualsAndHashCode</code>,
					<code>@Getter</code> on all fields, and <code>@Setter</code> on all non-final fields, and <code>@RequiredArgsConstructor</code>!</dd>
				<dt><a href="Cleanup.html"><code>@Cleanup</code></a></dt>
				<dd>Automatic resource management: Call your <code>close()</code> methods safely with no hassle.</dd>
				<dt><a href="Synchronized.html"><code>@Synchronized</code></a></dt>
				<dd><code>synchronized</code> done right: Don't expose your locks.</dd>
				<dt><a href="SneakyThrows.html"><code>@SneakyThrows</code></a></dt>
				<dd>To boldly throw checked exceptions where no one has thrown them before!</dd>
				<dt><a href="Log.html"><code>@Log</code></a></dt>
				<dd>Captain's Log, stardate 24435.7: &quot;What was that line again?&quot;</dd>
				<dt><a href="val.html"><code>val</code></a></dt>
				<dd>Finally! hassle-free final local variables.</dd>
				<dt><a href="Delegate.html"><code>@Delegate</code></a></dt>
				<dd>Don't lose your composition</dd>
			</dl>
		</div>
		<div class="pointer">
			The documentation above is a lot easier to follow, but if you want to build your own transformations,
			or you want to add javadoc to <code>lombok.jar</code> in your IDE, you can also check out <a href="../api/index.html">the javadoc</a>.
		</div>
		<h1>Running Lombok</h1>
		<h3>On eclipse</h3>
			Execute lombok.jar (doubleclick it, or run java -jar lombok.jar). Follow instructions.
		<h3>On javac (and maven, ant, and other build tools)</h3>
			Include lombok.jar on the classpath as you compile. That's all there is to it!<br />
			Lombok hosts its own maven repository, so adding lombok to maven is very simple. <a href="/mavenrepo/index.html">full instructions are here</a>.
		<h3>On GWT (Google Widget Toolkit), javadoc, and other source-based tools</h3>
			Use <a href="delombok.html">delombok</a> first, then run javadoc or GWT on the delombok-ed code.
		<h1>Running delombok</h1>
			<div>Delombok copies your source files to another directory, replacing all lombok annotations with their desugared form. So, it'll turn <code>@Getter</code>
				back into the actual getter. It then removes the annotation. This is useful for all sorts of reasons; you can check out what's happening under the hood,
				if the unthinkable happens and you want to stop using lombok, you can easily remove all traces of it in your source, and you can use delombok to preprocess
				your source files for source-level tools such as javadoc and GWT. More information about how to run delombok, including instructions for build tools
				can be found at the <a href="delombok.html">delombok page</a>.</div>
		<div class="footer">
			<a href="../credits.html" class="creditsLink">credits</a> | <span class="copyright">Copyright &copy; 2009-2010 Reinier Zwitserloot and Roel Spilker, licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>.</span>
		</div>
		<div style="clear: both;"></div>
	</div>
</div>
<script type="text/javascript">
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
	try {
		var pageTracker = _gat._getTracker("UA-9884254-1");
		pageTracker._trackPageview();
	} catch(err) {}
</script>
</body></html>