groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerald Wiltse <jerrywil...@gmail.com>
Subject Casting GroovyMbean as custom class
Date Sun, 20 Mar 2016 22:53:33 GMT
Hello,

I'm gathering a number of GroovyMBeans from remote servers over JMX, and I
have them each modeled with a custom classes.  I was hoping to be able to
simply cast the MBean as the other object type but get this error:

 with class 'groovy.util.GroovyMBean' to class
'com.dev.core.JdeInstanceBean'"

Is my goal even possible?

I think groovy would make it easy to do manually copy all the applicable
attributes/values from the GroovyMbean to a new instance of my class, but I
wanted to avoid that if possible.



Gerald R. Wiltse
jerrywiltse@gmail.com

Mime
View raw message