forked from projectlombok/lombok
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fixes projectlombok#3248] Add support for jakarta generated annotation
- Loading branch information
Showing
18 changed files
with
95 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package jakarta.annotation; | ||
|
||
import static java.lang.annotation.ElementType.*; | ||
import static java.lang.annotation.RetentionPolicy.SOURCE; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
@Documented | ||
@Retention(SOURCE) | ||
@Target({PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, PARAMETER}) | ||
public @interface Generated { | ||
String[] value(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package javax.annotation; | ||
|
||
import static java.lang.annotation.ElementType.*; | ||
import static java.lang.annotation.RetentionPolicy.SOURCE; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
@Documented | ||
@Retention(SOURCE) | ||
@Target({PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, PARAMETER}) | ||
public @interface Generated { | ||
String[] value(); | ||
} |
10 changes: 10 additions & 0 deletions
10
test/transform/resource/after-delombok/GeneratedJavaxJakarta.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class GeneratedJavaxJakarta { | ||
int x; | ||
|
||
@java.lang.SuppressWarnings("all") | ||
@javax.annotation.Generated("lombok") | ||
@jakarta.annotation.Generated("lombok") | ||
public int getX() { | ||
return this.x; | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
test/transform/resource/after-delombok/GeneratedJavaxOnLombokOn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//version :8 | ||
class GeneratedJavaxOnLombokOn { | ||
int x; | ||
@java.lang.SuppressWarnings("all") | ||
|
1 change: 0 additions & 1 deletion
1
test/transform/resource/after-delombok/GeneratedOffJavaxOn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//version :8 | ||
class GeneratedOffJavaxOn { | ||
int x; | ||
@java.lang.SuppressWarnings("all") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class GeneratedOn { | ||
int x; | ||
|
||
@java.lang.SuppressWarnings("all") | ||
@javax.annotation.Generated("lombok") | ||
public int getX() { | ||
return this.x; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class GeneratedJavaxJakarta { | ||
@lombok.Getter int x; | ||
GeneratedJavaxJakarta() { | ||
super(); | ||
} | ||
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") @jakarta.annotation.Generated("lombok") int getX() { | ||
return this.x; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class GeneratedOn { | ||
@lombok.Getter int x; | ||
GeneratedOn() { | ||
super(); | ||
} | ||
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int getX() { | ||
return this.x; | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
test/transform/resource/before/EqualsAndHashCodeWithSomeExistingMethods.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//CONF: lombok.addGeneratedAnnotation = false | ||
import lombok.*; | ||
import static lombok.AccessLevel.NONE; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//CONF: lombok.addJavaxGeneratedAnnotation = true | ||
//CONF: lombok.addJakartaGeneratedAnnotation = true | ||
class GeneratedJavaxJakarta { | ||
@lombok.Getter | ||
int x; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//CONF: lombok.addGeneratedAnnotation = true | ||
class GeneratedOn { | ||
@lombok.Getter | ||
int x; | ||
} |
2 changes: 1 addition & 1 deletion
2
...ansform/resource/messages-delombok/EqualsAndHashCodeWithSomeExistingMethods.java.messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5 Not generating equals: One of equals or hashCode exists. You should either write both of these or none of these (in the latter case, lombok generates them). | ||
4 Not generating equals: One of equals or hashCode exists. You should either write both of these or none of these (in the latter case, lombok generates them). |
2 changes: 1 addition & 1 deletion
2
test/transform/resource/messages-ecj/EqualsAndHashCodeWithSomeExistingMethods.java.messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5 Not generating equals: One of equals or hashCode exists. You should either write both of these or none of these (in the latter case, lombok generates them). | ||
4 Not generating equals: One of equals or hashCode exists. You should either write both of these or none of these (in the latter case, lombok generates them). |