Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reflection...  RSS feed

 
Val Dra
Ranch Hand
Posts: 439
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone,

I'd like to know more about reflection where it's best used and a more general question about the Method class in reflection package. Method class provides a method called getParameterTypes which returns an array of values. Now let's say that this array contains a value which starts with L followed by some other characters(hashcode) now this refers that this parameter type is Object(correct ?) I'd like to know are there other type of values can be returned ? Am i able to cast it , to it right away ? Because if not it's sort of not usefull to me then if my methods are stored in some file. I'd hate to use instanceof to check all the time for the rite type of a value to cast it to. Thank you for information.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!