-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#1976. A handlers' order has been changed.
- Loading branch information
Showing
5 changed files
with
162 additions
and
2 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
65 changes: 65 additions & 0 deletions
65
test/transform/resource/after-delombok/ValDelegateMethodReference.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,65 @@ | ||
import java.util.function.Function; | ||
|
||
public class ValDelegateMethodReference { | ||
public void config() { | ||
final Column<Entity, java.lang.String> column = createColumn(Entity::getValue); | ||
} | ||
|
||
private <V> Column<Entity, V> createColumn(Function<Entity, V> func) { | ||
return new Column<>(func); | ||
} | ||
} | ||
|
||
class Column<T, V> { | ||
public Column(Function<T, V> vp) { | ||
} | ||
} | ||
|
||
class Entity { | ||
private MyDelegate innerDelegate; | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public java.lang.String getValue() { | ||
return this.innerDelegate.getValue(); | ||
} | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public java.lang.Boolean getABoolean() { | ||
return this.innerDelegate.getABoolean(); | ||
} | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public void setValue(final java.lang.String value) { | ||
this.innerDelegate.setValue(value); | ||
} | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public void setABoolean(final java.lang.Boolean aBoolean) { | ||
this.innerDelegate.setABoolean(aBoolean); | ||
} | ||
} | ||
|
||
class MyDelegate { | ||
private String value; | ||
private Boolean aBoolean; | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public String getValue() { | ||
return this.value; | ||
} | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public Boolean getABoolean() { | ||
return this.aBoolean; | ||
} | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public void setValue(final String value) { | ||
this.value = value; | ||
} | ||
|
||
@java.lang.SuppressWarnings("all") | ||
public void setABoolean(final Boolean aBoolean) { | ||
this.aBoolean = aBoolean; | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
test/transform/resource/after-ecj/ValDelegateMethodReference.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,58 @@ | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.experimental.Delegate; | ||
import lombok.val; | ||
import java.util.function.Function; | ||
public class ValDelegateMethodReference { | ||
public ValDelegateMethodReference() { | ||
super(); | ||
} | ||
public void config() { | ||
final @val Column<Entity, java.lang.String> column = createColumn(Entity::getValue); | ||
} | ||
private <V>Column<Entity, V> createColumn(Function<Entity, V> func) { | ||
return new Column<>(func); | ||
} | ||
} | ||
class Column<T, V> { | ||
public Column(Function<T, V> vp) { | ||
super(); | ||
} | ||
} | ||
class Entity { | ||
private @Delegate MyDelegate innerDelegate; | ||
Entity() { | ||
super(); | ||
} | ||
public @java.lang.SuppressWarnings("all") java.lang.Boolean getABoolean() { | ||
return this.innerDelegate.getABoolean(); | ||
} | ||
public @java.lang.SuppressWarnings("all") java.lang.String getValue() { | ||
return this.innerDelegate.getValue(); | ||
} | ||
public @java.lang.SuppressWarnings("all") void setABoolean(final java.lang.Boolean aBoolean) { | ||
this.innerDelegate.setABoolean(aBoolean); | ||
} | ||
public @java.lang.SuppressWarnings("all") void setValue(final java.lang.String value) { | ||
this.innerDelegate.setValue(value); | ||
} | ||
} | ||
@Getter @Setter class MyDelegate { | ||
private String value; | ||
private Boolean aBoolean; | ||
MyDelegate() { | ||
super(); | ||
} | ||
public @java.lang.SuppressWarnings("all") String getValue() { | ||
return this.value; | ||
} | ||
public @java.lang.SuppressWarnings("all") Boolean getABoolean() { | ||
return this.aBoolean; | ||
} | ||
public @java.lang.SuppressWarnings("all") void setValue(final String value) { | ||
this.value = value; | ||
} | ||
public @java.lang.SuppressWarnings("all") void setABoolean(final Boolean aBoolean) { | ||
this.aBoolean = aBoolean; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
test/transform/resource/before/ValDelegateMethodReference.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,35 @@ | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.experimental.Delegate; | ||
import lombok.val; | ||
|
||
import java.util.function.Function; | ||
|
||
public class ValDelegateMethodReference { | ||
|
||
public void config() { | ||
val column = createColumn(Entity::getValue); | ||
} | ||
|
||
private <V> Column<Entity, V> createColumn(Function<Entity, V> func) { | ||
return new Column<>(func); | ||
} | ||
|
||
} | ||
|
||
class Column<T, V> { | ||
public Column(Function<T, V> vp) {} | ||
} | ||
|
||
class Entity { | ||
@Delegate | ||
private MyDelegate innerDelegate; | ||
} | ||
|
||
@Getter | ||
@Setter | ||
class MyDelegate { | ||
private String value; | ||
private Boolean aBoolean; | ||
} |