• Post Reply Bookmark Topic Watch Topic
  • New Topic

Access Modifier  RSS feed

 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
Is there a way to find out programmatically, the access modifier of a method before actually using it...?

Thanks
 
Jay Pawar
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code


LINE X : Check this link to see the constant values for all the modifiers.
click me

Just FYI, this is way out of SCJP objective scope.

[ January 09, 2005: Message edited by: Jay Pawar ]
[ January 09, 2005: Message edited by: Jay Pawar ]
 
Sulbha Jan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a bunch
 
Bert Bates
author
Sheriff
Posts: 8945
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sulbha, et. al.,

Just in case, after all of Jay's wonderful code, you guys didn't catch this...

It's NOT on the exam... phewww!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!