Hi,
I am trying to get the names of constructor parameters of a java class using scala reflection. I have the following:
Tender.java
public class Tender {
public String name;
public int age;
public Tender(String name,int age){
this.name = name;
this.age = age;
}
}
Program.scala
def classAccessors[T: TypeTag] = typeOf[T].members.head.asMethod.paramLists
private val symbols = classAccessors[Tender]
I am getting the value of symbols as List(List(value x$1, value x$2))
I want the actual names viz `name` & `age` rather than x$1 & x$2. Is there any way to accomplish this?
Thanks
Aravindh.S