groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blake McBride <>
Subject parseClass always returns the same class
Date Wed, 21 Mar 2018 14:25:11 GMT
Sorry, but I'm sure I'm confused.  I'm doing:

groovyLoader = new GroovyClassLoader(GroovyClass.class.getClassLoader());

only once.

Then when I do:

groovyClass = groovyLoader.parseClass(new File("MyClass.groovy"));

I get a groovyClass that I can use just fine.

However, if I change MyClass.groovy and run

groovyClass = groovyLoader.parseClass(new File("MyClass.groovy"));

again, I still get the old class (before my changes).  Shouldn't it be
parsing my changed file?

I know I can get a new groovyLoader and it'll work but then I lose all
of my other groovy classes I parsed and all of my groovy classes have
to be re-loaded.

Thanks for the help!

Blake McBride

View raw message