-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apt generator #3
base: master
Are you sure you want to change the base?
Conversation
* which can be passed to methods that accept TypeReference, or resolved using | ||
* <code>TypeFactory</code> to obtain {@link ResolvedType}. | ||
*/ | ||
public abstract class TypeReference<T> implements Comparable<TypeReference<T>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this need to be deleted
} | ||
|
||
public static void main(String... args) { | ||
final GitHub github = new GitHubFactory(config()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example on how the generated code would be invoked
import feign.Target.HardCodedTarget; | ||
import feign.example.github.GitHubExample.GitHub; | ||
|
||
public class GitHubFactory implements GitHub { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once the generator is implemented, this is the code it would generate
@@ -32,6 +32,11 @@ | |||
</properties> | |||
|
|||
<dependencies> | |||
<dependency> | |||
<groupId>org.projectlombok</groupId> | |||
<artifactId>lombok</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be provided, see https://projectlombok.org/setup/maven
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"provided" is declared on the parent pom
Thanks for taking care, @velo ! |
once implemented (right now is just an example of what the generator would produce) |
BTW, can you help me on automating this to run using graal VM? |
Ok, I see. I think, a staring point is to test, if GaalVM-compiler compiles this Java, too.
It seems to do so. For testing, if GaalVM native-image generation actual works with feign as a dependency, we would have to have a concrete application with a Java main class. Hmm, I don't know where to start from here. |
4219edf
to
faaf2ac
Compare
@SchulteMarkus seems this code generation approach would work on graal. I still wanna get ride of TypeReference |
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JAVA-ORGAPACHEHTTPCOMPONENTS-31517
No description provided.