Skip to content

How to fetch all variable in java class #7129

Answered by Shinpachi8
Shinpachi8 asked this question in Q&A
Discussion options

You must be logged in to vote

OK, I got it.
The reason why i can not get field in AdminUserToken is that AdminUserToken is Lombok-ed type,
So we can decode lombok and recreate the database.

get a copy of lombok.jar

wget https://projectlombok.org/downloads/lombok.jar -O "lombok.jar"

run "delombok" on the source files and write the generated files to a folder named "delombok"

java -jar "lombok.jar" delombok -n --onlyChanged . -d "delombok"

remove "generated by" comments

find "delombok" -name '*.java' -exec sed '/Generated by delombok/d' -i '{}' ';'

remove any left-over import statements

find "delombok" -name '*.java' -exec sed '/import lombok/d' -i '{}' ';'

copy delombok'd files over the original ones

cp -r "delombok/."…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Shinpachi8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant