这些是我的控制器和命令。现在我想获取所有字段名称。这是获取域类字段名称的链接 获取域类字段名称。但是我需要获取 Command 的字段名称,如下所示
class SocialRecruitingController
{
def getFieldNames()
{
ConnectionsAdvSearchCommand.fields.each
{it->
log.info(it?.name+",");
// Expecting keyword,fname,lname,title,company,school,location,country,postalCode
}
}
class ConnectionsAdvSearchCommand
{
String keyword
String fname;
String lname;
String title;
String company;
String school;
String location;
String country;
String postalCode;
}
}