Skip to content

Commit fb3fb8e

Browse files
committed
documentation updates
1 parent f420182 commit fb3fb8e

2 files changed

Lines changed: 40 additions & 6 deletions

File tree

Documentation.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,25 @@
107107
.setReturnType(String class)
108108

109109
// Generate class names which are condensed at the expense of
110-
// being mangled and not as readable by a human. This is
110+
// being mangled and not as readable by humans. This is
111111
// useful if you have a complicated descriptor which creates
112-
// class names too long to be compiled. (optional, disabled by default)
112+
// class names too long to be compiled. (disabled by default)
113113
.enableCondensedClassNames()
114114

115+
// Provide a custom name generator instance, to be consulted
116+
// when creating the generated source code.
117+
//
118+
// The `DefaultNameGenerator` implementation will leave names
119+
// as they are. A more compact form can be achieved by using
120+
// the `HashedNameGenerator`, which will try to shorten names
121+
// as much as possible.
122+
.useCustomNameGenerator(NameGenerator generator)
123+
124+
// Disable the printing of timestamps in the generated source
125+
// code. This will eliminate changes between successive executions
126+
// so long as the same version of the tool is used each time.
127+
.disableTimestamps()
128+
115129
// Complete the finished descriptor, returning a new
116130
// `Descriptor` object. (**required**)
117131
.build()

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ composeEmail()
5656

5757
### [Getting Started](https://github.com/UnquietCode/Flapi/wiki/Getting-Started)
5858
If you are using Maven (or Gradle, or Ivy) you can download and install to your local repo, or include the following
59-
repository and dependency in your POM file:
60-
```
59+
repository and dependency in your build script:
60+
61+
#### Maven
62+
```xml
6163
<repository>
6264
<id>uqc</id>
6365
<name>UnquietCode Repository</name>
@@ -73,13 +75,31 @@ repository and dependency in your POM file:
7375
<scope>test</scope>
7476
</dependency>
7577
```
76-
In a test, define your `Descriptor` object and output the generated source code. (The
78+
79+
#### Gradle
80+
```groovy
81+
repositories {
82+
maven {
83+
url 'http://www.unquietcode.com/maven/releases'
84+
}
85+
}
86+
87+
...
88+
89+
dependencies {
90+
testCompile 'unquietcode.tools.flapi:flapi:0.6.1'
91+
}
92+
```
93+
94+
In a test define your `Descriptor` object and output the generated source code. (The
7795
[Pizza Builder](https://github.com/UnquietCode/Flapi/wiki/Pizza-Builder-Example)
7896
example is a simple descriptor you can start with.) You can also make use of the
7997
[maven plugin](https://github.com/UnquietCode/Flapi/wiki/Maven-Build-Plugin) to
8098
perform the code generation.
8199

82-
At the time of writing, the project builds fine in JDK 6 and 7. However, please note that the automated builds are no longer being run against JDK 6.
100+
At the time of writing, the project builds fine in JDK 6 and 7. However, please note that
101+
the automated builds are no longer being run against JDK 6.
102+
83103

84104
### Additional Resources
85105

0 commit comments

Comments
 (0)