mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-20 02:17:52 +00:00
layout delombok page
This commit is contained in:
1 parent
da7c7720a6
commit
f3881e51da
1 file changed
+5
-8
@@ -17,22 +17,19 @@
|
||||
|
||||
<p>
|
||||
Delombok is included in <code>lombok.jar</code>. To use it, all you need to run on the command line is:
|
||||
<div class="snippet">
|
||||
<pre>java -jar lombok.jar delombok src -d src-delomboked</pre>
|
||||
</div><br />
|
||||
<pre>java -jar lombok.jar delombok src -d src-delomboked</pre>
|
||||
<br />
|
||||
Which will duplicate the contents of the <code>src</code> directory into the <code>src-delomboked</code> directory, which will be created if it doesn't already exist, but delomboked of course. Delombok on the command line has a few more options; use the <code>--help</code> parameter to see more options.
|
||||
</p><p>
|
||||
To let delombok print the transformation result of a single java file directly to standard output, you can use:
|
||||
<div class="snippet">
|
||||
<pre>java -jar lombok.jar delombok -p MyJavaFile.java</pre>
|
||||
</div>
|
||||
<pre>java -jar lombok.jar delombok -p MyJavaFile.java</pre>
|
||||
</p>
|
||||
|
||||
<@f.main.h3 title="Running delombok in ant" />
|
||||
|
||||
<p>
|
||||
<code>lombok.jar</code> includes an ant task which can apply delombok for you. For example, to create javadoc for your project, your <code>build.xml</code> file would look something like:
|
||||
<div class="snippet"><pre><target name="javadoc">
|
||||
<pre><target name="javadoc">
|
||||
<taskdef classname="lombok.delombok.ant.Tasks$Delombok" classpath="lib/lombok.jar" name="delombok" />
|
||||
<mkdir dir="build/src-delomboked" />
|
||||
<strong><delombok verbose="true" encoding="UTF-8" to="build/src-delomboked" from="src"></strong>
|
||||
@@ -41,7 +38,7 @@
|
||||
<mkdir dir="build/api" />
|
||||
<javadoc sourcepath="build/src-delomboked" defaultexcludes="yes" destdir="build/api" />
|
||||
</target></pre>
|
||||
</div><br />
|
||||
<br />
|
||||
Instead of a <code>from</code> attribute, you can also nest <code><fileset></code> nodes.
|
||||
</p>
|
||||
|
||||
|
||||
Reference in new issue
Block a user