Groovy Expando 动态集名称
是否可以动态设置扩展的类?
设置后
jr = new Expando()
办法
def end = 'name'
有没有
jr.end
让我真正得到存储在中的值
jr.name
Is it possibly to dynamically set the class of an expando??
Having set
jr = new Expando()
Is there a way to
def end = 'name'
so that
jr.end
will actually give me the value stored in
jr.name
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定我是否理解你的问题,也许这会有所帮助
I'm not sure I understand your question, maybe this will help
修复了,需要同时赋值。哎哟!
fixed it, need to assign a value at the same time. Doh!