-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support custom @RecordableConstructor annotations in RecordingAnnotat…
…ionsProvider
- Loading branch information
Showing
8 changed files
with
108 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
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
55 changes: 55 additions & 0 deletions
55
core/deployment/src/test/java/io/quarkus/deployment/recording/OtherTestConstructorBean.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,55 @@ | ||
package io.quarkus.deployment.recording; | ||
|
||
import java.util.Objects; | ||
|
||
public class OtherTestConstructorBean { | ||
|
||
String first; | ||
final String last; | ||
int age; | ||
|
||
@TestRecordingAnnotationsProvider.TestRecordableConstructor | ||
public OtherTestConstructorBean(String first, String last) { | ||
this.first = first; | ||
this.last = last; | ||
} | ||
|
||
public void setFirst(String first) { | ||
//should not be called, as it was initialized in the constructor | ||
this.first = "Mrs " + first; | ||
} | ||
|
||
public String getFirst() { | ||
return first; | ||
} | ||
|
||
public String getLast() { | ||
return last; | ||
} | ||
|
||
public int getAge() { | ||
return age; | ||
} | ||
|
||
public OtherTestConstructorBean setAge(int age) { | ||
this.age = age; | ||
return this; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
return true; | ||
if (o == null || getClass() != o.getClass()) | ||
return false; | ||
OtherTestConstructorBean that = (OtherTestConstructorBean) o; | ||
return age == that.age && | ||
Objects.equals(first, that.first) && | ||
Objects.equals(last, that.last); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(first, last, age); | ||
} | ||
} |
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