0

Ever since I have heard that you can generate classes during runtime (from say, a URL I suppose) and can use java.lang.Reflect to fire methods based on String input, I was wondering how the process is done?

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Ezzaral
0

The Sun tutorial on Reflection is a pretty good place to start:
http://java.sun.com/docs/books/tutorial/reflect/index.html

Keep in mind that using reflection to manipulate classes and methods is much slower than normal compile-time usage patterns (and the code is pretty long and unwieldy to boot) and should only be done when you need to work with classes or methods that are not present at compile time.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.