2

I am using Java Parser to get information about the method in a source file. I based my implementation as described in this answer . However the details of constructors are not being given. I think it has to do with how the Java parser works as the normal methods have a return type and the constructor doesn't.

Does anyone know how to be able to also get information of constructors using the Java parser?

Community
  • 1
  • 1
ict1991
  • 1,980
  • 5
  • 24
  • 34

1 Answers1

2

check for a symbol that's the same as the class name. All constructors are of the type public classname(args) or private classname(args). No return, and no class declaration.

Lucas
  • 5,061
  • 1
  • 17
  • 17