How to update existing class
- Dominant language
- Java
- Stars
- 2k
- Forks
- 392
- Avg merge
- 11h 24m
- Merged PRs (30d)
- 36
Description
### Describe the bug
I just discovered this library and I'm trying to see if it's possible to do something that I require.
I have the following code:
```
@MyAnnotation
public class Book
{
private String name;
}
```
And I want this to get generated:
```
public class Book
{
private String name;
boolean isValid()
{
return name != null;
}
}
```
I'm already able to generate this code but the output file is created in a generated folder with the same name.
I changed the output folder to be the same as the generated code but it's replacing the existing class.
It's possible to just generate the file in memory and then compile it?
I don't want to generate a new file or change the source code of the existing one.
I can't use other libraries such as Byte-Buddy because I need this new file available during compilation.
Any help is welcome.
Thanks
### Spoon Version
10.2.0
### JVM Version
11
### What operating system are you using?
Windows 10
Contributor guide
Assessment
This issue has not been assessed yet.