• Post Reply Bookmark Topic Watch Topic
  • New Topic

Get Declared Methods without using Reflection  RSS feed

 
Anshuman Bhatia
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to get the list of public methods for a class without using reflection ?

Not using reflection because the Security Manager has restricted access for java.lang.class
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Reflection is Java's standard API to find out things about classes at runtime. There's no alternative built-in API that still works if reflection doesn't because of security restrictions.
 
Carles Gasques
Ranch Hand
Posts: 199
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An alternative to reflection could be a bytecode api like ASM.


Best regards,
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!