T
tchou
Hello everyone,
I want to be able to dynamically load the attributes of a class Turtle.
That Turtle class have some Book attributes, Book being a class I made.
I want to load a list of those attributes but :
Field f = getClass().getField(book); // won't work.
because it is said that the getField method can't take this kind of
arguments.
The cause seems to be that Book is a class I made. How can I make
reflection work also on my own class?
I tried to implements Type and Member in my Book class, but it did not
work.
What am I doing wrong?
Thanks,
Tchouye.
I want to be able to dynamically load the attributes of a class Turtle.
That Turtle class have some Book attributes, Book being a class I made.
I want to load a list of those attributes but :
Field f = getClass().getField(book); // won't work.
because it is said that the getField method can't take this kind of
arguments.
The cause seems to be that Book is a class I made. How can I make
reflection work also on my own class?
I tried to implements Type and Member in my Book class, but it did not
work.
What am I doing wrong?
Thanks,
Tchouye.