Skip to content

Commit 6176dd0

Browse files
committed
Updates documentation.
1 parent a452663 commit 6176dd0

File tree

1 file changed

+14
-43
lines changed

1 file changed

+14
-43
lines changed

Documentation.java

+14-43
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
/*******************************************************************************
2-
Copyright 2013 Benjamin Fagin
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
16-
17-
Read the included LICENSE.TXT for more information.
18-
******************************************************************************/
19-
201
// # Flapi
212
// ### _A fluent API generator for Java_
223

@@ -38,7 +19,7 @@
3819
* runtime classes and generated interfaces. The generated sources should
3920
* be included in your project, perhaps as a module dependency. (This project
4021
* also contains a maven plugin which allows you to regenerate your sources
41-
* on the fly. See more [here](https://github.com/UnquietCode/Flapi/wiki)).
22+
* on the fly. See more [here](https://github.com/UnquietCode/Flapi/wiki/Maven-Build-Plugin)).
4223
*
4324
*
4425
* ### At Run Time
@@ -154,12 +135,10 @@
154135
* moving in to and out of blocks, by way of Java's type system, until
155136
* you finally 'escape' the top block or a value is returned from the
156137
* current block.
157-
*
158-
* A new block is defined by calling the `startBlock(...)` method,
159-
* passing in the method signature and the optional name. This
160-
* returns a `MethodBuilder` object which allows you to customize
161-
* the invocation in the parent block. Methods will be discussed in
162-
* just a moment.
138+
*
139+
* A block is comprised of methods, and these roughly correspond
140+
* to the methods found in the generated interfaces. Methods will
141+
* be discussed in just a moment.
163142
*/
164143

165144
.startBlock("SomeBlock", "beginSomething()").any()
@@ -176,10 +155,13 @@
176155
/**
177156
* ### BlockBuilder Methods
178157
*
179-
* A block consists is started with `startBlock(...)` and must
180-
* end with a call to `endBlock()`. This is due to an important
181-
* disadvantage of method chaining: it's impossible to know
182-
* when the user is 'done' without an explicit method call.
158+
* A new block is started with `startBlock(...)` and must
159+
* end with a call to `endBlock()`. There should
160+
* be at least one method in every block which is marked as a
161+
* terminal method (via `last(...)`). There is one exception to
162+
* this rule, which is when all of your methods are disappearing
163+
* (via `atMost(...)`). In that case, a warning is printed and
164+
* the last method available in each state is marked as terminal.
183165
*/
184166

185167
// Start a new block. This can be called either from the top level
@@ -191,21 +173,10 @@
191173
// generated, and so they cannot be referenced.
192174
.startBlock(String methodSignature)
193175

194-
// end the current block (**required**)
176+
// End the current block. Returns a `MethodBuilder` to
177+
// configure the invocation in the parent. (**required**)
195178
.endBlock()
196179

197-
/**
198-
* ### Block Methods
199-
*
200-
* A block is comprised of methods, and these roughly correspond
201-
* to the methods found in the generated interfaces. There should
202-
* be at least one method in every block which is marked as a
203-
* terminal method (via `last(...)`). There is one exception to
204-
* this rule, which is when all of your methods are disappearing
205-
* (via `atMost(...)`). In that case, a warning is printed and
206-
* the last method available in each state is marked as terminal.
207-
*/
208-
209180
// Add a new method to the block. If no return type is provided
210181
// then `void` is inferred.
211182
.addMethod("someMethod()").any()

0 commit comments

Comments
 (0)