Adding methods to class and use them in other groovy code -
i'm new groovy. have class i'm adding methods using metaclass. here code have parser.groovy:
privateclass.metaclass.convertddttomap { obj,filelocation -> } where privateclass class coming jar. in other file named hack.groovy have following code:
class hack extends privateclass { //.. code convertddttomap(param,param) } when run hack.groovy, exception method convertddttomap not there.
however parser.groovy in same classpath , gets compiled. not adding method.
where i'm making mistake?
parser.groovy being compiled doing nothing, code there needs called. example using new parser().run()
Comments
Post a Comment