| Author |
Reflection Problem
|
V Vijay Veeraraghavan
Greenhorn
Joined: Apr 06, 2008
Posts: 21
|
|
---------------------------------- dear all i am using reflection to invoke particular methods to fetch the values from them. i have a class structure like this //the above code works for all the methods... but for getValue and setValue exception is thrown.... java.lang.IllegalAccessException: Class MyClass can not access a member of class MyPackage.C with modifiers "public" i am able to understand that the problem is with the protected package which i try to access from outside. but how do i solve this problem roundabout way... thanks Vijay Veeraraghavan ---------------------------------- [Nitesh: Added code tags: Please UseCodeTags] [ November 24, 2008: Message edited by: Nitesh Kant ]
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Not really an advanced question. Have a read of the JavaDocs for java.lang.reflect.AccessibleObject; you should be able to work out the way round this from there.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: Reflection Problem
|
|
|