aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/Data.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-06-19 16:24:10 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-06-19 16:24:10 +0200
commitff306fa5d97a09d69332c76a33596bb053222855 (patch)
tree00124b2190b36f13381d9513717e558aacbad973 /src/lombok/Data.java
parente56ab6c2457531c0ce8556097f945b6e7946f6f2 (diff)
downloadlombok-ff306fa5d97a09d69332c76a33596bb053222855.tar.gz
lombok-ff306fa5d97a09d69332c76a33596bb053222855.tar.bz2
lombok-ff306fa5d97a09d69332c76a33596bb053222855.zip
Added initial support for the @Data annotation. Currently produces getters and setters only,
not yet a constructor, toString, hashCode, or equals. HandleGetter and HandleSetter have been updated to handle static (theoretic; you can't put annotations on static fields normally). You can now make AnnotationValue objects using just an annotationNode and a target type, as well as check if a given annotationNode is likely to represent a target annotation type. This is in Javac and Eclipse classes. HandleGetter and HandleSetter can now be asked to make a getter/setter, and will grab access level off of a Getter/Setter annotation, if present.
Diffstat (limited to 'src/lombok/Data.java')
-rw-r--r--src/lombok/Data.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lombok/Data.java b/src/lombok/Data.java
new file mode 100644
index 00000000..e985a28a
--- /dev/null
+++ b/src/lombok/Data.java
@@ -0,0 +1,13 @@
+package lombok;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface Data {
+ String staticConstructor() default "";
+ int hashCodePrime() default 31;
+}