Results 1 to 2 of 2
- 02-12-2009, 09:57 PM #1
Member
- Join Date
- Jan 2009
- Posts
- 12
- Rep Power
- 0
Annotations to change access level of method
Hello,
Even though I am not an advanced user I think this is may be an advanced topic (feel free to correct me). I was wondering if an annotation exists that would allow a method (or field) to change its level of access for specific types of methods or classes? For example if you have methods that you want to be private but would like to run Junit tests on them. If it does not exist is possible to create one? Also if this idea seems completely unreasonable or useless let me know why?
Thanks in advance.
- 02-16-2009, 06:52 AM #2
Member
- Join Date
- Oct 2008
- Posts
- 68
- Rep Power
- 0
Not sure if this is what you are looking for. But if you want to do unit testing of private methods then you may use Reflection hack for calling private methods on java see Hacking Private Methods
____________________________________________
Priya,
Cooking is Fun| Eat Healthy Stay Fit | Sweets | Raita | Bread | Dal| SnacksCheers,
Eat Healthy Stay Fit
Similar Threads
-
multiple threads access the same method.
By bhanu in forum New To JavaReplies: 3Last Post: 02-16-2009, 06:54 AM -
Method access or field access
By carderne in forum New To JavaReplies: 2Last Post: 12-06-2008, 06:20 PM -
Row level locking........
By jithan in forum New To JavaReplies: 0Last Post: 09-02-2008, 07:09 AM -
row level locking
By jithan in forum New To JavaReplies: 1Last Post: 08-28-2008, 06:42 PM -
Field Level Security
By narayanasgs in forum Web FrameworksReplies: 0Last Post: 05-30-2008, 08:34 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks