mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 16:17:34 +00:00
Removed the equalsPrime thing, because that's just needlessly putting implementation details in there. If switching primes is so important, hash the type name and turn that into a prime, or something.
Also added some javadoc.
This commit is contained in:
1 parent
fdde039d23
commit
794801c3c9
1 file changed
+11
-1
+11
-1
@@ -8,6 +8,16 @@ import java.lang.annotation.Target;
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Data {
|
||||
/**
|
||||
* If you specify a static constructor name, then the generated constructor will be private, and
|
||||
* instead a static factory method is created that other classes can use to create instances.
|
||||
* We suggest the name: "of", like so:
|
||||
*
|
||||
* <pre>
|
||||
* public @Data(staticConstructor = "of") class Point { final int x, y; }
|
||||
* </pre>
|
||||
*
|
||||
* Default: No static constructor, instead the normal constructor is public.
|
||||
*/
|
||||
String staticConstructor() default "";
|
||||
int hashCodePrime() default 31;
|
||||
}
|
||||
Reference in new issue
Block a user