diff options
| author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2016-10-17 23:09:21 +0200 |
|---|---|---|
| committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2017-05-29 21:01:53 +0200 |
| commit | 599b6aab677439ae1bdea2cdca3233d0b763fd3f (patch) | |
| tree | 8766f124271d056c8e8c22fd1a8a1ada08284275 /website2/templates | |
| parent | 4e75ed8f8661033662b2d26c4a42fafa9d61b75f (diff) | |
| download | lombok-599b6aab677439ae1bdea2cdca3233d0b763fd3f.tar.gz lombok-599b6aab677439ae1bdea2cdca3233d0b763fd3f.tar.bz2 lombok-599b6aab677439ae1bdea2cdca3233d0b763fd3f.zip | |
Updated just about all of the pages to the template-based redesign.
Added ajaxified loading for feature pages.
Diffstat (limited to 'website2/templates')
33 files changed, 1992 insertions, 0 deletions
diff --git a/website2/templates/_scaffold.html b/website2/templates/_scaffold.html new file mode 100644 index 00000000..5da9e144 --- /dev/null +++ b/website2/templates/_scaffold.html @@ -0,0 +1,108 @@ +<#macro feature title code> + <div class="bs-callout bs-callout-danger"> + <h4><a href="${code}"><code>${title}</code></a></h4> + <p><#nested></p> + </div> +</#macro> + +<#macro scaffold load=[]> + <!DOCTYPE html> + <html lang="en"> + <head> + <meta charset="utf-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> + <meta name="google-site-verification" content="uCgX3Or3kDRGpbJ6JCsQc3Ub4JsnR5-p0itfsKAYZ_U" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <link href="/favicon.ico" rel="icon" type="image/x-icon" /> + + <title>Project Lombok</title> + + <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> + + <link href="/css/bootstrap.css" rel="stylesheet" /> + <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" /> + + <link href="/css/custom.css" rel="stylesheet" /> + + <#list load as ld> + <#if ld?ends_with(".css")> + <link href="${ld?url_path}" rel="stylesheet" /> + </#if> + </#list> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> + <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script> + + <script src="/js/swfobject.js"></script> + <script src="/js/main.js"></script> + <#list load as ld> + <#if ld?ends_with(".js")> + <script src="${ld?url_path}"></script> + </#if> + </#list> + </head><body> + <a href="https://github.com/rzwitserloot/lombok" class="fork-me"> + <img + alt="Fork me on GitHub" + src="//s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" /> + </a> + + <div class="navbar navbar-default navbar-fixed-top"> + <div class="container"> + <div class="navbar-header"> + <a href="/" class="navbar-brand">Lombok Project</a> + <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + </div> + <div class="navbar-collapse collapse" id="navbar-main"> + <ul class="nav navbar-nav"> + <li class="dropdown"> + <a class="dropdown-toggle pointer" data-toggle="dropdown">Features<span class="caret"></span></a> + <ul class="dropdown-menu" aria-labelledby="themes"> + <li><a href="/features/stable">Stable</a></li> + <li><a href="/features/experimental">Experimental</a></li> + </ul> + </li> + <li> + <a href="https://groups.google.com/group/project-lombok" target="_blank"> + <span>Discuss/Help</span> + </a> + </li> + <li> + <a href="https://wiki.github.com/rzwitserloot/lombok/contributing" target="_blank"> + <span>Contribute</span> + </a> + </li> + <li class="dropdown"> + <a class="dropdown-toggle pointer" data-toggle="dropdown">Install<span class="caret"></span></a> + <ul class="dropdown-menu" aria-labelledby="themes"> + <li><a href="/install/compilers">Compilers</a></li> + <li class="divider"></li> + <li><a href="/install/ide">IDE</a></li> + <li class="divider"></li> + <li><a href="/install/android">Android</a></li> + <li><a href="/install/others">Frameworks & build systems</a></li> + </ul> + </li> + <li><a href="/download">Download</a></li> + </ul> + </div> + </div> + </div> + <div class="container-fluid main-section" id="main-section"> + <#nested> + </div> + <footer class="container"> + <footer class="footer text-center"> + <div class="container"> + <a href="/credits">credits</a> | Copyright © 2009-${year} The Project Lombok + Authors, licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT + license</a>. + </div> + </footer> + </footer> + </body> +</html> +</#macro> diff --git a/website2/templates/changelog.html b/website2/templates/changelog.html new file mode 100644 index 00000000..80697e70 --- /dev/null +++ b/website2/templates/changelog.html @@ -0,0 +1,11 @@ +<#import "/_scaffold.html" as main> +<@main.scaffold> + <div class="page-header top5"> + <div class="row text-center"> + <h1>Changelog</h1> + </div> + <div class="row text-center"> + <h1>@CHANGELOG@</h1> + </div> + </div> +</@main.scaffold> diff --git a/website2/templates/credits.html b/website2/templates/credits.html new file mode 100644 index 00000000..95bff83d --- /dev/null +++ b/website2/templates/credits.html @@ -0,0 +1,50 @@ +<#import "/_scaffold.html" as main> + +<@main.scaffold> + <div class="page-header top5"> + <div class="row text-center"> + <h1>Project Lombok - About the authors and everyone that's helped us create Project Lombok.</h1> + </div> + <div class="row"> + <div class="credits"> + <div class="committers personList"> + <h3>Regular contributors to Project Lombok:</h3> + + <div class="row text-center"> + <div class="person col-md-2"> + <div class="imgCt"><img class="reinierImg" src="images/reinier.jpg" /></div> + <span class="name">Reinier Zwitserloot</span> + </div> + <div class="person col-md-2"> + <div class="imgCt"><img class="roelImg" src="images/roel.jpg" /></div> + <span class="name">Roel Spilker</span> + </div> + </div> + </div> + <div class="thanks"> + We'd like to thank: + <ul> + <li> + <strong>Perry Nguyen</strong> (pfn on ##java on freenode) for creating the inspiration for project lombok. + </li><li> + <strong>Tor Norbye</strong>, <strong>Jan Lahoda</strong>, and <strong>Petr Jiricka</strong> for helping out with Netbeans internals and/or javac. + </li><li> + All contributors who submitted patches or helped answering questions!</li> + </ul> + + as well as the authors of the following tools that we use: + + <ul> + <li> + <a href="http://github.com/">Github</a> for hosting lombok's repository. + </li><li> + The <a href="http://asm.ow2.org/index.html">ASM team</a> at ObjectWeb for creating an excellent class file editing tool. Lombok uses ASM to interact with Eclipse. + </li><li> + <strong>Markus Gebhard</strong> for creating <a href="http://java2html.de/">java2html</a> which we use for the example code snippets on the features pages. + </li> + </ul> + </div> + </div> + </div> + </div> +</@main.scaffold> diff --git a/website2/templates/disable-checked-exceptions.html b/website2/templates/disable-checked-exceptions.html new file mode 100644 index 00000000..94dd433e --- /dev/null +++ b/website2/templates/disable-checked-exceptions.html @@ -0,0 +1,24 @@ +<div class="page-header top5"> + <div class="row text-center"> + <h1 class="text-center">Tired of checked exceptions?</h1> + </div> + <div class="row"> + <p> + This lombok spinoff project consists of a hack that only works in javac - not eclipse or any other IDE.<br /> + It will completely disable the notion of checked exceptions. You may throw any exception anywhere, and you may also catch any exception anywhere. In standard javac, you may not catch a checked exception that is not declared as thrown by at least 1 statement in your try block, unless it is <code>Exception</code> or <code>Throwable</code>.<br /> + This restriction is lifted as well. + </p> + </div> + <div class="row"> + <h2 class="text-center">Usage</h2> + + <p> + Just make sure <code>disableCheckedExceptions-alpha.jar</code> is on the classpath as you compile. For example:<br /> + <code>javac -cp disableCheckedExceptions-alpha.jar MySource.java</code> + </p><p> + Ready to try it out? download it here: <a href="/downloads/disableCheckedExceptions-alpha.jar">disableCheckedExceptions-alpha.jar</a> + </p><p> + Want to know how its done? Grab the lombok repository <a href="https://github.com/rzwitserloot/lombok/tree/disableCheckedExceptions">here on github</a>, and look in the <code>experimental</code> directory. + </p> + </div> +</div> diff --git a/website2/templates/download.html b/website2/templates/download.html new file mode 100644 index 00000000..0205cba0 --- /dev/null +++ b/website2/templates/download.html @@ -0,0 +1,102 @@ +<#import "/_scaffold.html" as main> +<@main.scaffold> + <div class="page-header top5"> + <div> + <div class="row page-center"> + <div> + <h1 class="text-center"> + <div class="row"> + <icon class="fa fa-download"></icon> + <a> + Download ${version} + </a> + </div> + <div class="row"> + <a href="#/changelog"> + changelog + </a> + </div> + </h1> + </div> + </div> + <div class="row"> + <div class="text-center"> + <h3> + Feeling adventurous? Download the latest <a href="lombok-edge.jar">snapshot</a> + release. + </h3> + </div> + </div> + </div> + + <!--<div class="row">--> + + <!--<table class="table table-bordered">--> + <!--<tr>--> + <!--<td class="platform">Maven, Ivy or Gradle</td>--> + <!--<td class="instruction">Lombok is in maven central. <a href="mavenrepo/index.html">More…</a>--> + <!--</td>--> + <!--</tr>--> + + <!--<tr>--> + <!--<td class="platform">Javac</td>--> + <!--<td class="instruction">Just put <code>lombok.jar</code> on the classpath.</td>--> + <!--</tr>--> + + <!--<tr>--> + <!--<td class="platform">NetBeans</td>--> + <!--<td class="instruction">Just put <code>lombok.jar</code> on the classpath and enable annotation--> + <!--processing. <a href="setup/netbeans.html">More…</a></td>--> + <!--</tr>--> + + <!--<tr>--> + <!--<td class="platform">Eclipse and variants</td>--> + <!--<td class="instruction">Run <code>lombok.jar</code> as a java app (i.e. doubleclick it, usually) to--> + <!--install. Also add lombok.jar to your project. <span style="font-size: 0.8em;"><em>Supported--> + <!--variants: Springsource Tool Suite, JBoss Developer Studio</em></span></td>--> + <!--</tr>--> + + <!--<tr>--> + <!--<td class="platform">IDEA IntelliJ</td>--> + <!--<td class="instruction"><a href="https://code.google.com/p/lombok-intellij-plugin/">A plugin--> + <!--developed by Michael Plushnikov</a> adds support for most features.--> + <!--</td>--> + <!--</tr>--> + + <!--<tr>--> + <!--<td class="platform">Javadoc</td>--> + <!--<td class="instruction">First delombok your code then run javadoc on the result. <a--> + <!--href="features/delombok.html">More…</a></td>--> + <!--</tr>--> + + <!--<tr>--> + <!--<td class="platform">Android</td>--> + <!--<td class="instruction">The proper way to use lombok with android is somewhat complicated but--> + <!--possible. <a href="setup/android.html">More…</a></td>--> + <!--</tr>--> + + <!--<tr>--> + <!--<td class="platform">GWT</td>--> + <!--<td class="instruction">Lombok works with GWT. <a href="setup/gwt.html">More…</a></td>--> + <!--</tr>--> + + <!--<tr>--> + <!--<td class="platform">Play! Framework</td>--> + <!--<td class="instruction">Use Aaron Freeman's <a--> + <!--href="https://github.com/aaronfreeman/play-lombok#readme">lombok play plugin</a>.--> + <!--</td>--> + <!--</tr>--> + + <!--<tr>--> + <!--<td class="platform">ecj</td>--> + <!--<td class="instruction">Lombok works on ecj and ecj-based tools. <a--> + <!--href="setup/ecj.html">More…</a></td>--> + <!--</tr>--> + <!--</table>--> + <!--<p style="font-size: 0.9em">--> + <!--Or, <a href="http://code.google.com/p/projectlombok/downloads/list">download</a> a previous version of--> + <!--lombok.--> + <!--</p>--> + <!--</div>--> + </div> +</@main.scaffold> diff --git a/website2/templates/features/EqualsAndHashCode.html b/website2/templates/features/EqualsAndHashCode.html new file mode 100644 index 00000000..91a9cb70 --- /dev/null +++ b/website2/templates/features/EqualsAndHashCode.html @@ -0,0 +1,52 @@ +<#import "_features.html" as f> + +<@f.scaffold title="@EqualsAndHashCode" logline="Equality made easy: Generates <code>hashCode</code> and <code>equals</code> implementations from the fields of your object."> + <@f.overview> + <p> + Any class definition may be annotated with <code>@EqualsAndHashCode</code> to let lombok generate implementations of the <code>equals(Object other)</code> and <code>hashCode()</code> methods. By default, it'll use all non-static, non-transient fields, but you can exclude more fields by naming them in the optional <code>exclude</code> parameter to the annotation. Alternatively, you can specify exactly which fields you wish to be used by naming them in the <code>of</code> parameter. + </p><p> + By setting <code>callSuper</code> to <em>true</em>, you can include the <code>equals</code> and <code>hashCode</code> methods of your superclass in the generated methods. For <code>hashCode</code>, the result of <code>super.hashCode()</code> is included in the hash algorithm, and for <code>equals</code>, the generated method will return false if the super implementation thinks it is not equal to the passed in object. Be aware that not all <code>equals</code> implementations handle this situation properly. However, lombok-generated <code>equals</code> implementations <strong>do</strong> handle this situation properly, so you can safely call your superclass equals if it, too, has a lombok-generated <code>equals</code> method.<br/> + </p><p> + Setting <code>callSuper</code> to <em>true</em> when you don't extend anything (you extend <code>java.lang.Object</code>) is a compile-time error, because it would turn the generated <code>equals()</code> and <code>hashCode()</code> implementations into having the same behaviour as simply inheriting these methods from <code>java.lang.Object</code>: only the same object will be equal to each other and will have the same hashCode. Not setting <code>callSuper</code> to <em>true</em> when you extend another class generates a warning, because unless the superclass has no (equality-important) fields, lombok cannot generate an implementation for you that takes into account the fields declared by your superclasses. You'll need to write your own implementations, or rely on the <code>callSuper</code> chaining facility. + </p><p> + <em>NEW in Lombok 0.10: </em>Unless your class is <code>final</code> and extends <code>java.lang.Object</code>, lombok generates a <code>canEqual</code> method which means JPA proxies can still be equal to their base class, but subclasses that add new state don't break the equals contract. The complicated reasons for why such a method is necessary are explained in this paper: <a href="https://www.artima.com/lejava/articles/equality.html">How to Write an Equality Method in Java</a>. If all classes in a hierarchy are a mix of scala case classes and classes with lombok-generated equals methods, all equality will 'just work'. If you need to write your own equals methods, you should always override <code>canEqual</code> if you change <code>equals</code> and <code>hashCode</code>. + </p><p> + <em>NEW in Lombok 1.14.0: </em>To put annotations on the <code>other</code> parameter of the <code>equals</code> (and, if relevant, <code>canEqual</code>) method, you can use <code>onParam=@__({@AnnotationsHere})</code>. Be careful though! This is an experimental feature. For more details see the documentation on the <a ng-click="toFeature('on-x')">onX</a> feature. + </p> + </@f.overview> + + <@f.snippets name="EqualsAndHashCode" /> + + <@f.confKeys> + <dt> + <code>lombok.equalsAndHashCode.doNotUseGetters</code> = [<code>true</code> | <code>false</code>] (default: false) + </dt><dd> + If set to <code>true</code>, lombok will access fields directly instead of using getters (if available) when generating <code>equals</code> and <code>hashCode</code> methods. The annotation parameter '<code>doNotUseGetters</code>', if explicitly specified, takes precedence over this setting. + </dd><dt> + <code>lombok.equalsAndHashCode.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set) + </dt><dd> + Lombok will flag any usage of <code>@EqualsAndHashCode</code> as a warning or error if configured. + </dd> + </@f.confKeys> + + <@f.smallPrint> + <p> + Arrays are 'deep' compared/hashCoded, which means that arrays that contain themselves will result in <code>StackOverflowError</code>s. However, this behaviour is no different from e.g. <code>ArrayList</code>. + </p><p> + You may safely presume that the hashCode implementation used will not change between versions of lombok, however this guarantee is not set in stone; if there's a significant performance improvement to be gained from using an alternate hash algorithm, that will be substituted in a future version. + </p><p> + For the purposes of equality, 2 <code>NaN</code> (not a number) values for floats and doubles are considered equal, eventhough 'NaN == NaN' would return false. This is analogous to <code>java.lang.Double</code>'s equals method, and is in fact required to ensure that comparing an object to an exact copy of itself returns <code>true</code> for equality. + </p><p> + If there is <em>any</em> method named either <code>hashCode</code> or <code>equals</code>, regardless of return type, no methods will be generated, and a warning is emitted instead. These 2 methods need to be in sync with each other, which lombok cannot guarantee unless it generates all the methods, hence you always get a warning if one <em>or</em> both of the methods already exist. You can mark any method with <code>@lombok.experimental.Tolerate</code> to hide them from lombok. + </p><p> + Attempting to exclude fields that don't exist or would have been excluded anyway (because they are static or transient) results in warnings on the named fields. You therefore don't have to worry about typos. + </p><p> + Having both <code>exclude</code> and <code>of</code> generates a warning; the <code>exclude</code> parameter will be ignored in that case. + </p><p> + By default, any variables that start with a $ symbol are excluded automatically. You can onlyinclude them by using the 'of' parameter. + </p><p> + If a getter exists for a field to be included, it is called instead of using a direct field reference. This behaviour can be suppressed:<br /> + <code>@EqualsAndHashCode(doNotUseGetters = true)</code> + </p> + </@f.smallPrint> +</@f.scaffold> diff --git a/website2/templates/features/GetterLazy.html b/website2/templates/features/GetterLazy.html new file mode 100644 index 00000000..b1f374a8 --- /dev/null +++ b/website2/templates/features/GetterLazy.html @@ -0,0 +1,31 @@ +<#import "_features.html" as f> + +<@f.scaffold title="@Getter(lazy=true)" logline="Laziness is a virtue!"> + <@f.history> + <code>@Getter(lazy=true)</code> was introduced in Lombok v0.10. + </@f.history> + + <@f.overview> + <p> + You can let lombok generate a getter which will calculate a value once, the first time this getter is called, and cache it from then on. This can be useful if calculating the value takes a lot of CPU, or the value takes a lot of memory. To use this feature, create a <code>private final</code> variable, initialize it with the expression that's expensive to run, and annotate your field with <code>@Getter(lazy=true)</code>. The field will be hidden from the rest of your code, and the expression will be evaluated no more than once, when the getter is first called. There are no magic marker values (i.e. even if the result of your expensive calculation is <code>null</code>, the result is cached) and your expensive calculation need not be thread-safe, as lombok takes care of locking. + </p> + </@f.overview> + + <@f.snippets name="GetterLazy" /> + + <@f.confKeys> + <dt> + <code>lombok.getter.lazy.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set) + </dt><dd> + Lombok will flag any usage of <code>@Getter(lazy=true)</code> as a warning or error if configured. + </dd> + </@f.confKeys> + + <@f.smallPrint> + <p> + You should never refer to the field directly, always use the getter generated by lombok, because the type of the field will be mangled into an <code>AtomicReference</code>. Do not try to directly access this <code>AtomicReference</code>; if it points to itself, the value has been calculated, and it is <code>null</code>. If the reference points to <code>null</code>, then the value has not been calculated. This behaviour may change in future versions. Therefore, <em>always</em> use the generated getter to access your field! + </p><p> + Other Lombok annotations such as <code>@ToString</code> always call the getter even if you use <code>doNotUseGetters=true</code>. + </p> + </@f.smallPrint> +</@f.scaffold> diff --git a/website2/templates/features/GetterSetter.html b/website2/templates/features/GetterSetter.html new file mode 100644 index 00000000..7ceaa3ba --- /dev/null +++ b/website2/templates/features/GetterSetter.html @@ -0,0 +1,70 @@ +<#import "_features.html" as f> + +<@f.scaffold title="@Getter and @Setter" logline="Never write <code>public int getFoo() {return foo;}</code> again."> + <@f.overview> + <p> + You can annotate any field with <code>@Getter</code> and/or <code>@Setter</code>, to let lombok generate the default getter/setter automatically.<br /> + A default getter simply returns the field, and is named <code>getFoo</code> if the field is called <code>foo</code> (or <code>isFoo</code> if the field's type is <code>boolean</code>). A default setter is named <code>setFoo</code> if the field is called <code>foo</code>, returns <code>void</code>, and takes 1 parameter of the same type as the field. It simply sets the field to this value. + </p><p> + The generated getter/setter method will be <code>public</code> unless you explicitly specify an <code>AccessLevel</code>, as shown in the example below. Legal access levels are <code>PUBLIC</code>, <code>PROTECTED</code>, <code>PACKAGE</code>, and <code>PRIVATE</code>. + </p><p> + You can also put a <code>@Getter</code> and/or <code>@Setter</code> annotation on a class. In that case, it's as if you annotate all the non-static fields in that class with the annotation. + </p><p> + You can always manually disable getter/setter generation for any field by using the special <code>AccessLevel.NONE</code> access level. This lets you override the behaviour of a <code>@Getter</code>, <code>@Setter</code> or <code>@Data</code> annotation on a class. + </p><p> + To put annotations on the generated method, you can use <code>onMethod=@__({@AnnotationsHere})</code>; to put annotations on the only parameter of a generated setter method, you can use <code>onParam=@__({@AnnotationsHere})</code>. Be careful though! This is an experimental feature. For more details see the documentation on the <a href="/features/experimental/onX">onX</a> feature. + </p><p> + <em>NEW in lombok v1.12.0:</em> javadoc on the field will now be copied to generated getters and setters. Normally, all text is copied, and <code>@return</code> is <em>moved</em> to the getter, whilst <code>@param</code> lines are <em>moved</em> to the setter. Moved means: Deleted from the field's javadoc. It is also possible to define unique text for each getter/setter. To do that, you create a 'section' named <code>GETTER</code> and/or <code>SETTER</code>. A section is a line in your javadoc containing 2 or more dashes, then the text 'GETTER' or 'SETTER', followed by 2 or more dashes, and nothing else on the line. If you use sections, <code>@return</code> and <code>@param</code> stripping for that section is no longer done (move the <code>@return</code> or <code>@param</code> line into the section). + </p> + </@f.overview> + + <@f.snippets name="GetterSetter" /> + + <@f.confKeys> + <dt> + <code>lombok.accessors.chain</code> = [<code>true</code> | <code>false</code>] (default: false) + </dt><dd> + If set to <code>true</code>, generated setters will return <code>this</code> (instead of <code>void</code>). An explicitly configured <code>chain</code> parameter of an <a href="/features/experimental/Accessors"><code>@Accessors</code></a> annotation takes precedence over this setting. + </dd><dt> + <code>lombok.accessors.fluent</code> = [<code>true</code> | <code>false</code>] (default: false) + </dt><dd> + If set to <code>true</code>, generated getters and setters will not be prefixed with the bean-standard '<code>get</code>, <code>is</code> or <code>set</code>; instead, the methods will use the same name as the field (minus prefixes). An explicitly configured <code>chain</code> parameter of an <a href="/features/experimental/Accessors"><code>@Accessors</code></a> annotation takes precedence over this setting. + </dd><dt> + <code>lombok.accessors.prefix</code> += <em>a field prefix</em> (default: empty list) + </dt><dd> + This is a list property; entries can be added with the <code>+=</code> operator. Inherited prefixes from parent config files can be removed with the <code>-=</code> operator. Lombok will strip any matching field prefix from the name of a field in order to determine the name of the getter/setter to generate. For example, if <code>m</code> is one of the prefixes listed in this setting, then a field named <code>mFoobar</code> will result in a getter named <code>getFoobar()</code>, not <code>getMFoobar()</code>. An explicitly configured <code>prefix</code> parameter of an <a href="/features/experimental/Accessors"><code>@Accessors</code></a> annotation takes precedence over this setting. + </dd><dt> + <code>lombok.getter.noIsPrefix</code> = [<code>true</code> | <code>false</code>] (default: false) + </dt><dd> + If set to <code>true</code>, getters generated for <code>boolean</code> fields will use the <code>get</code> prefix instead of the default<code>is</code> prefix, and any generated code that calls getters, such as <code>@ToString</code>, will also use <code>get</code> instead of <code>is</code> + </dd><dt> + <code>lombok.setter.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set) + </dt><dd> + Lombok will flag any usage of <code>@Setter</code> as a warning or error if configured. + </dd><dt> + <code>lombok.getter.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set) + </dt><dd> + Lombok will flag any usage of <code>@Getter</code> as a warning or error if configured. + </dd> + </@f.confKeys> + + <@f.smallPrint> + <p> + For generating the method names, the first character of the field, if it is a lowercase character, is title-cased, otherwise, it is left unmodified. Then, get/set/is is prefixed. + </p><p> + No method is generated if any method already exists with the same name (case insensitive) and same parameter count. For example, <code>getFoo()</code> will not be generated if there's already a method <code>getFoo(String... x)</code> even though it is technically possible to make the method. This caveat exists to prevent confusion. I |
