Skip to content

Commit 95ab296

Browse files
committedApr 28, 2016
experimenting with the markup
1 parent 2a6815d commit 95ab296

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
 

‎factory.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ layout: page
88

99
Overview
1010
--------
11+
1112
Do not repeat yourself writing builders for your APIs, with all that overhead of fluent structure and checking.
1213
Generate builders for static factory methods as easily as you would generate builders for [immutable values](/immutable.html).
1314
A factory builder can be seen as a form of partial function application - Supply named parameters one by one and evaluate the function at the end.

‎immutable.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ layout: page
88

99
Overview
1010
--------
11+
1112
To reap the benefits of immutability in Java, we created an annotation processor
1213
to easily create simple and consistent value objects. You can think of it as
1314
[Guava's Immutable Collections](https://code.google.com/p/guava-libraries/wiki/ImmutableCollectionsExplained) but for regular objects.
@@ -30,12 +31,13 @@ services, and of good design in general. We feel proud to fill a gap in the area
3031
See [sample generated code](/generated.html) for an example of the code generated by the processor,
3132
or jump straight to the [features](/immutable.html#features)!
3233

33-
--------
3434
Concepts
3535
--------
3636

3737
<a name="abstract-value"></a>
38+
3839
### Abstract value type
40+
3941
An Abstract value type is a manually-written non-final (usually abstract) class or
4042
interface (or even annotation type) that defines the value type and is annotated with the
4143
`org.immutable.value.Value.Immutable` annotation.
@@ -44,7 +46,9 @@ It is strongly recommended that abstract value types not introduce visible mutab
4446
Abstract value types are used as the source model for generated code. [Get started!](/getstarted.html).
4547

4648
<a name="attributes"></a>
49+
4750
### Attributes
51+
4852
An attribute holds a value that cannot be changed after the owning object is created.
4953
The name "attribute" is used to intentionally distinguish the concept from "fields" or JavaBean "properties", and to imply a similarity with Java annotation attributes.
5054
It is defined by an accessor method: A zero argument, non-`void`-returning Java method.
@@ -54,6 +58,7 @@ are non-`abstract` methods that have bodies that compute values.
5458
Such accessors therefore require special annotations to distinguish them from regular methods.
5559

5660
### Immutable implementation class
61+
5762
A [Generated](/generated.html) `final` class that extends a manually-written [abstract value type](#abstract-value)
5863
and implements all declared accessor methods as well as supporting fields, methods, constructors, and a builder class.
5964
An immutable implementation class implements abstract attribute accessors
@@ -65,11 +70,12 @@ Immutable implementation classes are the primary (but not the only) source code
6570
generated by the _Immutables_ annotation processor.
6671

6772
<a name="features"></a>
68-
--------
73+
6974
Features
7075
--------
7176

7277
### Value
78+
7379
The annotation processor works by using annotated abstract value types as a model to generate immutable implementations.
7480
A generated implementation extends or implements an abstract value type. Classes don't have to be abstract if they don't define abstract accessor methods.
7581

0 commit comments

Comments
 (0)
Please sign in to comment.