Skip to content
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

loading an external class #25

Closed
javadch opened this issue Apr 25, 2015 · 4 comments
Closed

loading an external class #25

javadch opened this issue Apr 25, 2015 · 4 comments
Assignees
Labels

Comments

@javadch
Copy link

javadch commented Apr 25, 2015

I am getting a complete class definition from another application in the form of a string, as well as some information about it like the class and package name. How can I pass use this information to create and load the class using the Byte Buddy?
PS: The classes have to implement an interface which my application knows about.

@raphw
Copy link
Owner

raphw commented Apr 26, 2015

Are those classes described as Java source code? Byte Buddy operates on the byte code level. You probably require a Java compiler API. Javac offers such an API for example.

@raphw raphw self-assigned this Apr 26, 2015
@raphw raphw added the question label Apr 26, 2015
@javadch
Copy link
Author

javadch commented Apr 26, 2015

Yes, the classes are java sources. I am using the Java Compiler API but there is a problem that the compiler does not work on production machines as it requires the JDK!
Is it possible for you to consider this use-case Byte Buddy?

@raphw
Copy link
Owner

raphw commented Apr 26, 2015

Byte Buddy is language agnostic by design, it will never contain a compiler, sorry. The code would not share any requirements, it would make more sense to write a different library for that. I am sure, there exists something suited to your needs already, though.

@raphw raphw closed this as completed Apr 26, 2015
@javadch
Copy link
Author

javadch commented Apr 26, 2015

Thank you for the clarification.

On Sun, Apr 26, 2015 at 6:29 PM, Rafael Winterhalter <
notifications@github.com> wrote:

Closed #25 #25.


Reply to this email directly or view it on GitHub
#25 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants