mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-28 06:21:43 +00:00
Fixed issue 374: updated documentation about case insensitive checking for existing methods.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2010 The Project Lombok Authors.
|
||||
* Copyright (C) 2009-2012 The Project Lombok Authors.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -45,8 +45,8 @@ import java.lang.annotation.Target;
|
||||
* Note that fields of type {@code boolean} (but not {@code java.lang.Boolean}) will result in an
|
||||
* {@code isFoo} name instead of {@code getFoo}.
|
||||
* <p>
|
||||
* If any method named {@code getFoo}/{@code isFoo} exists, regardless of return type or parameters, no method is generated,
|
||||
* and instead a compiler warning is emitted.
|
||||
* If any method named {@code getFoo}/{@code isFoo} (case insensitive) exists, regardless of return type or parameters,
|
||||
* no method is generated, and instead a compiler warning is emitted.
|
||||
* <p>
|
||||
* This annotation can also be applied to a class, in which case it'll be as if all non-static fields that don't already have
|
||||
* a {@code @Getter} annotation have the annotation.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2010 The Project Lombok Authors.
|
||||
* Copyright (C) 2009-2012 The Project Lombok Authors.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -42,8 +42,8 @@ import java.lang.annotation.Target;
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* If any method named {@code setFoo} exists, regardless of return type or parameters, no method is generated,
|
||||
* and instead a compiler warning is emitted.
|
||||
* If any method named {@code setFoo} (case insensitive) exists, regardless of return type or parameters,
|
||||
* no method is generated, and instead a compiler warning is emitted.
|
||||
* <p>
|
||||
* This annotation can also be applied to a class, in which case it'll be as if all non-static fields that don't already have
|
||||
* a {@code Setter} annotation have the annotation.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2010 The Project Lombok Authors.
|
||||
* Copyright (C) 2009-2012 The Project Lombok Authors.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
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 and same parameter count. For example, <code>getFoo()</code>
|
||||
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. If the generation of a method is skipped for this reason, a warning is emitted instead. Varargs count as 0 to N parameters.
|
||||
</p><p>
|
||||
|
||||
Reference in New Issue
Block a user