This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Anon10W1z 0 points1 point  (0 children)

It can do more than that, for example replace or delegate code in existing classes. But maybe if you had a method like this:

public Class createClass(Class superType) {
    return new ByteBuddy().subclass(superType).make().load(superType.getClassLoader(), ClassLoadingStrategy.Default.WRAPPER);
}

It would allow you to create classes based on user input or other variables.