Lex Man
Lex Man

Reputation: 169

Reference class that hasn't been built yet ByteBuddy

I'm trying to generate entity classes with ByteBuddy but need to do relationship mapping so want to reference a class before I have built it.

It seems that I can't add the builder as a return value and I don't have any idea what else to try. Is there a way to accomplish this task?

Upvotes: 0

Views: 19

Answers (1)

dogourd
dogourd

Reputation: 59

You can use DynamicType.Builder.toTypeDescription to obtain a temporary type representation, or you can use TypeDescription.Latent to directly carry some key type information.

Upvotes: 0

Related Questions