Results 1 to 9 of 9
Thread: Dynamic Classes
- 11-16-2009, 11:56 PM #1
Member
- Join Date
- Nov 2009
- Posts
- 2
- Rep Power
- 0
Dynamic Classes
Hi, I'm starting to study how to program dynamic classes (if that's what it's called)
Is it possible to add a field or a method to a class on execution time?
I'm starting to see some papers related to 'ClassLoader' but they're a bit confusing.
Any help/directions is appreciated.
Thanks.
- 11-17-2009, 02:14 AM #2
You can dynamically load a class using ClassLoader that can be specified at run-time, and, with introspection, you could discover what members and methods that class has and create instances of that loaded class.
My Hobby Project: LegacyClone
- 11-17-2009, 02:48 AM #3
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
If you add fields or methods wouldn't it be a different class?
What is the actual problem you are trying to solve? There arebytecode libraries that allow the generation of classes at runtime.
- 11-17-2009, 06:01 AM #4
Java is dynamic and all of its classes are unless you make them static........Do you know the difference between static and dynamic.....it is 1 and one is a binary number......: static just means the compiler isn't allowed to move it around......and that alll classes on that program have access to that variable and can change the value of that static variable without permisssiom [i e public private or classs path] ; hmmmmmmmmmmmmmmm think
Last edited by aaroncarpet; 11-17-2009 at 06:03 AM. Reason: typo
- 11-17-2009, 06:04 AM #5
did i say that right fubarable??????????
- 11-17-2009, 06:06 AM #6
unless it is private static.....then only the declaring class can affect thst dtstic vsrisnle
- 11-17-2009, 06:07 AM #7
owhat avout "stoic" tpes fuerable
- 11-17-2009, 06:11 AM #8
first you must learb the differebce between static and dynamic equilibrium........chemistry
-
static stand alone classes? OK for C#, but not kosher for Java.
Similar Threads
-
Dynamic GUI
By ike2u in forum New To JavaReplies: 4Last Post: 08-08-2009, 02:50 AM -
dynamic inherence
By itaipee in forum Advanced JavaReplies: 6Last Post: 02-07-2009, 01:05 PM -
Dynamic Table using JSP
By banie in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 08-27-2008, 03:13 AM -
Help for dynamic classes
By Bender in forum Advanced JavaReplies: 1Last Post: 12-19-2007, 08:46 PM -
dynamic update in swt
By sandor in forum SWT / JFaceReplies: 0Last Post: 05-14-2007, 08:32 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks